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).
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就OK
本文解决了一个 Spring Boot 应用中无法正确识别 YAML 格式配置文件的问题,并给出了具体的解决步骤,包括添加 H2 数据库依赖以及更换配置文件格式。
1966

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



