首页 > 其他分享 >关于报错If you have database settings to be loaded from ...

关于报错If you have database settings to be loaded from ...

时间:2022-11-01 11:59:02浏览次数:54  
标签:... database 配置 报错 loaded settings

今天配置分页后启动项目报错

If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).

随后检查yml文件的配置发现没有配置出问题,查看资源后,看到一条

需要在启动类的@EnableAutoConfiguration或@SpringBootApplication中添加exclude = {DataSourceAutoConfiguration.class},排除此类的autoconfig

遂尝试了一下,发现没有报错了

 

标签:...,database,配置,报错,loaded,settings
From: https://www.cnblogs.com/ai377377/p/16847191.html

相关文章