1、If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).
解决方法:@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
2、nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
网上有答案 (详情):
(1)引入mybatis依赖,但我的项目已经引入了所以不是mybatis依赖的问题。
(2)将配置文件改成yml格式,我的项目也已经是yml,也排除;
(3)引入druid-spring-boot-starter,我的项目之前引入的是druid,改成
druid-spring-boot-starter后问题解决。
感谢这位老兄😊;