springboot启动提示缺少数据源

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

正解:因为spring boot只要你在pom中引入了mybatis-spring-boot-starter 他就会默认需要加载数据库相关的配置

可以加上

@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})

posted @ 2019-02-26 15:33  M号开发者  阅读(501)  评论(0编辑  收藏  举报