启动SpringBoot 应用时,报异常:
Description:
Cannot determine embedded database driver class for database type NONE
如图所示:

解决办法:
在项目application.properties文件中,添加数据源相关配置:
spring.datasource.url=jdbc:mysql://localhost:3306/test
spring.datasource.username=root
spring.datasource.password=ROOT
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.max-idle=10
spring.datasource.max-wait=10000
spring.datasource.min-idle=5
spring.datasource.initial-size=5

本文介绍了一种常见的SpringBoot启动时出现的异常“Cannot determine embedded database driver class for database type NONE”,并提供了解决方案,即通过在application.properties文件中正确配置数据库连接信息来修复该问题。
325

被折叠的 条评论
为什么被折叠?



