慕容9408899
2018-12-23 01:22
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
spring.datasource.passwork=123456 password拼错了
spring.datasource.driverClassName=com.jdbc.mysql.Driver 检查后发现这个也写错了,改正com.mysql.jdbc.Driver 后启动成功了
SpringBoot构建电商基础秒杀项目
49066 学习 · 954 问题
相似问题