Cannot determine embedded database driver class for database type NONE

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).


问题:

1.我使用的是springboot ,配置文件是后缀为yml格式的,然而程序不知道我什么不识别后缀文件为yml的配置文件,改为application.properties就能识别了,不理解。

解决方法:

说是找不到数据库

1.pom中加

<dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <scope>runtime</scope> </dependency>

2.把application.yml格式的配置文件改为application.properties就OKCannot determine embedded database driver class for database type NONE