Description:
Failed to bind properties under 'spring.datasource.type' to java.lang.Class<javax.sql.DataSource>:
Property: spring.datasource.type
Value: com.machange.v2.c3p0.ComboPooledDataSource
Origin: class path resource [application.yml] - 9:11
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
Process finished with exit code 1
错误提示,yml文件9到11行。观察数据源配置
#数据源配置
spring:
datasource:
type: com.machange.v2.c3p0.ComboPooledDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/springboot?useUnicode=yes&characterEncoding