Springboot正常启动,但是访问404报错

原因:

查看是否配置文件中有以下配置:

server.context-path=/hellopath

我这里是以/hellopath为例,如果有该配置的话,只能通过该路径访问到。

 

其他原因

原文地址:https://www.cnblogs.com/lilinzhiyu/p/8126399.html