配置了德鲁伊连接池后项目启动失败
Description:
Failed to bind properties under 'spring.datasource.type' to java.lang.Class<javax.sql.DataSource>:
Property: spring.datasource.type
Value: com.alibaba.druid.pool.DruidDataSource
Origin: class path resource [application.properties]:6:24
Reason: No converter found capable of converting from type [java.lang.String] to type [java.lang.Class<javax.sql.DataSource>]
Action:
Update your application's configuration
==============================================================================
pom中配置
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.1.3</version>
</dependency>
================================================================================
application.properties中
mybatis.mapperLocations=classpath:mapping/*.xml
spring.datasource.name=miaosha
spring.datasource.url=jdbc:mysql://localhost:3306/miaosha
spring.datasource.username=root
spring.datasource.passwork=123456
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
spring.datasource.driverClassName=com.jdbc.mysql.Driver