解决springboot报Whitelabel Error Page错误

初学者刚开始学习springboot时,可能会遇到如下错误:

原因是因为 SpringBoot项目的Bean装配默认规则是根据Application类所在的包位置从上往下扫描!

解决办法:

将application所在包拿到外面来:

猜你喜欢

转载自blog.csdn.net/qq_39038465/article/details/82621664