Springboot框架
springboot
不会秃头也能变强的LeShy
学习之路 日益成长
展开
-
SpringBoot : 当使用@SpringBootApplication 和 @ComponentScan 注解 导致报错
SpringBoot : 当使用@SpringBootApplication 和 @ComponentScan 注解 导致报错 当只有一个@ComponentScan的时候,SpringBootApplication是不会被加载的,两者共存问题导致报错 解决办法: 使用@ComponentScans({@ComponentScan("包名")})代替@ComponentScan方可解决 @SpringBootApplication @ComponentScans({@ComponentS...原创 2020-11-08 15:36:27 · 1452 阅读 · 0 评论 -
Springboot 启动报错:Failed to configure a DataSource ‘url‘ attribute is not specified
问题:启动Springboot 报错 Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured :无法配置DataSource的url属性。 解决方法: ①在application.properties配置文件配置也可解决。 ②在Springboot的启动类中头部声明即可: @SpringBootApplicatio...原创 2020-10-26 09:03:09 · 575 阅读 · 0 评论