springboot项目启动无法访问到controller原因之一:引导类位置有问题

新建的springboot项目启动后,无法访问到controller

页面是404错误

查看项目结构,发现是新建工程的启动类位置有问题,controller类应该位于引导类的同级包或者子级包中。需要将下图的引导类放在com.alphajuns包下即可访问controller

 

posted @ 2019-05-04 16:26  AlphaJunS  阅读(2164)  评论(0编辑  收藏  举报