springboot环境下默认使用的是h2数据库,你没有对h2进行配置,这里我是mysql数据库,需要配置一下mysql数据库
Description: Failed to bind properties under '' to com.zaxxer.hikari.HikariDataSource: Property: driverclassname Value: com.mysql.cj.jdbc.Driver Origin: "driverClassName" from property source "source" Reason: Failed to load driver class 12345
这个错误是因为springboot环境下默认使用的是h2数据库,你没有对h2进行配置,这里我是mysql数据库,需要配置一下
application.yml 配置如下: spring: application: name: item-service datasource: url: jdbc:mysql://localhost:3306/xxxx?serverTimezone=Asia/Shanghai username: root password: root driver-class-name: com.mysql.jdbc.Driver 1234567891011
application.properties 配置如下: spring.datasource.driver-class-name=com.mysql.jdbc.Driver 1234https://blog.csdn.net/qq_41887560/article/details/105411461