使用Spring Boot 整合MySQL的时候配置可能会出现这个故障
spring.datasource.driver-class-name= com.mysql.jdbc.Driver
这个问题是由于MySQL 这个jar 包依赖类型默认是runtime ,
也就是说只有运行时生效,虽然这里报错,但是不影响你代码运行。
解决方法:
选中项目—> 右键—–> Open Module Settings ——>Modules——>Dependencies
完美解决
使用Spring Boot 整合MySQL的时候配置可能会出现这个故障
spring.datasource.driver-class-name= com.mysql.jdbc.Driver
这个问题是由于MySQL 这个jar 包依赖类型默认是runtime ,
也就是说只有运行时生效,虽然这里报错,但是不影响你代码运行。
解决方法:
选中项目—> 右键—–> Open Module Settings ——>Modules——>Dependencies
完美解决