[springboot] 启动异常Cannot determine embedded database driver class for database type NONE 解决

问题描述:

启动springboot项目时,启动失败,报错信息:

***************************
APPLICATION FAILED TO START
***************************

Description:

Cannot determine embedded database driver class for database type NONE

Action:

If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).

错误原因:

导入了数据库相关的依赖(诸如mybatis一类的框架),而又没有在全局配置文件中配置数据库相关信息

问题解决:

两种方案:
1 检测数据库相关依赖是否不需要,不需要则将其删除

2 在全局配置文件中配置数据库信息:

spring.datasource.driverClassName=
spring.datasource.url=
spring.datasource.username=
spring.datasource.password=

你可能感兴趣的:(bug记录)