SpringBoot启动报错CannotdetermineembeddeddatabasedriverclassfordatabasetypeNONESpring SpringBoot启动报错Cannot determine embedded database driver class for database type NONE SpringBoot启动时会自动注入数据源和配置JPA 解决
SpringBoot启动报错Cannot determine embedded database driver class for database type NONE
SpringBoot启动时会自动注入数据源和配置JPA
解决方法
在 Application.properties 文件内配置数据源即可。代码如下
spring.datasource.driver-class-namecom.mysql.jdbc.Driverspring.datasource.urljdbc:mysql://localhost:3306/test?characterEncodingutf-8falsespring.datasource.usernamerootspring.datasource.passwordroot