Description: Failed to bind properties under '' to com.zaxxer.hikari.HikariDataSource: Property: driverclassname Value: oracle.jdbc.OracleDriver Origin: "driverClassName" from property source "source" Reason: Unable to set value for property driver-class-name Action: Update your application's configuration
這個錯誤是因為springboot測試環境下默認使用的是h2數據庫,你沒有對h2進行配置
我用的mysql數據庫,需要指定一下
在application.properties中添加
spring.datasource.driver-class-name=com.mysql.jdbc.Driver