spring boot如何修改默认访问路径,详细教程
1、使用idea创建spring boot项目



2、添加spring-boot-starter-web依赖

3、启动spring boot项目,浏览器直接访问8080端口,访问路径为"/"

4、修改配置文件application.properties

5、添加server.servlet.context-path=/hello,代表访问路径为"/hello"

6、重启项目,如下图所示

1、使用idea创建spring boot项目
2、添加spring-boot-starter-web依赖
3、启动spring boot项目,浏览器直接访问8080端口,访问路径为"/"
4、修改配置文件application.properties
5、添加server.servlet.context-path=/hello,代表访问路径为"/hello"
6、重启项目,如下图所示