-
ConverterNotFoundExce ---> 转换器未找到超出
Caused by: org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [java.sql.Driver]
......
org.springframework.boot.context.properties.bind.BindConverter.convert(BindConverter.java:88)
at org.springframework.boot.context.properties.bind.Binder.bindProperty(Binder.java:324)
at org.springframework.boot.context.properties.bind.Binder.bindObject(Binder.java:267)
at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:221)
... 67 common frames omitted
2022-03-08 08:53:53.253 [main] ERROR o.s.b.d.LoggingFailureAnalysisReporter -
***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to bind properties under 'spring.datasource.druid.driver' to java.sql.Driver:
Property: spring.datasource.druid.driver
Value: com.mysql.cj.jdbc.Driver
Origin: class path resource [application.yml]:11:15
Reason: No converter found capable of converting from type [java.lang.String] to type [java.sql.Driver]
Action:
Update your application's configuration
Disconnected from the target VM, address: '127.0.0.1:51259', transport: 'socket'
=================================================================
1.错误的 application.yml 配置
大部分电脑都不需要这样配置,
配置中的属性都是颜色都是深色,没有变,是因为 driver: com.mysql.cj.jdbc.Driver
将 driver 改为 driver-class-name 即可!
2.先clean清除缓存,在compile编译,