网上说法很多,我记录一个比较特殊的
解决方法,pom加上:
mysql
mysql-connector-java
org.springframework.boot
spring-boot-starter-jdbc
此方法为以毒攻毒,因为又产生另一个报错:
Failed to configure a DataSource: ‘url’ attribute is not specified and no embedde
这个问题要去看yml的配置了
spring:
datasource:
url: jdbc:mysql://localhost:3306/read_data?useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: root
password: 123456
driver-class-name: com.mysql.jdbc.Driver
然后就能启动了


![Failed to instantiate [org.springframework.boot.autoconfigure.jdbc.DataSourceProperties]: Constructo Failed to instantiate [org.springframework.boot.autoconfigure.jdbc.DataSourceProperties]: Constructo](http://www.mshxw.com/aiimages/31/352135.png)
