![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Spring
HL_123123
这个作者很懒,什么都没留下…
展开
-
spring boot项目出现controller的路由没被注册
spring boot项目出现controller的路由没被注册,原因:启动类application跟controller不在一个包中,扫描不到controller,如启动类在com.oyx.a,controller在com.oyx.b 解决办法:方法1:将controller跟启动类放在一个包中,或者在启动类所在包的子包中方法2:在启动类上添加注解 @Compon转载 2017-03-23 23:10:06 · 4076 阅读 · 0 评论 -
No qualifying bean of type xxxxx is defined
多数原因是Bean没有正确注册,造成的原因有:1、@ComponentScan('....')中省略号是不是没有写对2、注解是不是没有加,例如@Component,@Service,@Controller,@Repository。原创 2017-05-13 22:37:06 · 1144 阅读 · 0 评论 -
spring @PropertySource classpath
Spring @PropertySource 找不到文件的问题,一般是路径没有指引对或者是在classpath:后少加了一个/。例如正确的姿势是这样的,而你的可能是这样的原创 2017-05-17 21:55:03 · 4804 阅读 · 0 评论