SpringBoot项目页面报404错误解决方法

1,596 阅读1分钟

错误现象: 通过启动类正常启动SpringBoot项目后,页面无法访问,报错:There was an unexpected error (type=Not Found, status=404)

解决办法: 在确定了controller层的路径和依赖都引入正确后,需要排查的就是项目路径结构了.

很可能是controller控制类 不在启动类所在的目录下或子目录中.