** WARNING ** : Your ApplicationContext is unlikely to start due to a @Component


错误信息:

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

解决办法:

springboot主函数在src/main/java根目录下时,会默认扫描所有的包,提示程序不希望这么做,加上@ComponentScan("zxw")限制一下扫描包 就可以了
** WARNING ** : Your ApplicationContext is unlikely to start due to a @Component_第1张图片

你可能感兴趣的:(** WARNING ** : Your ApplicationContext is unlikely to start due to a @Component)