各位大佬,今天我遇到一个问题,加载驱动时报不能加载问题,这是在application.properties文件中配置的
如果是用代码加载的话,则不报错,请问是什么原因
我最终解决的办法是将driver-class-name改为driverClassName
我尝试了很多次,不知道原因是什么,这样写没错,如果写driver-class-name则报错
#this method will report the driver can not load the exception
#spring.datasource.driver-class-name= com.mysql.jdbc.Driver
spring.datasource.driverClassName=com.mysql.jdbc.Driver