SpringBoot 警告:ApplicationContext is unlikely to start due to a @ComponentScan of the default package

* WARNING * : Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.

  1. 如何解决
    既然他说该类不能从组件的默认包启动,那就给他建立一个包好了。

// 一般发出这个警告的原因是你把启动类直接放在的src目录下面。
// 你需要在src目录下面再建一个包,比如controlcenter,然后把启动类放到controlcenter下面。


1、springboot警告:ApplicationContext is unlikely to start due to a @ComponentScan of the default package
https://blog.csdn.net/qq_15071263/article/details/78459087

2、Spring-boot 启动时碰到的错误
https://segmentfault.com/a/1190000004493460


你可能感兴趣的:(SpringBoot)