使用spring boot连接数据库出现no profiles are currently active的问题

来源:互联网 发布:vr全景合成软件 编辑:程序博客网 时间:2024/06/06 15:47

问题描述:

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

解决方法:

在spring boot入口方法上加上注解
//禁用spring自动配置数据库
@EnableAutoConfiguration(exclude = DataSourceAutoConfiguration.class)

阅读全文
0 0
原创粉丝点击