Spring boot默认是/ ,这样直接通过http://ip:port/就可以访问到index页面,如果要修改为
http://ip:port/path/ 访问的话,
那么需要在Application.properties文件中加入server.context-path = /你的path,
比如:spring-boot,那么访问地址就是http://ip:port/spring-boot 路径。
server.context-path=/spring-boot
Spring boot 默认端口是8080,如果想要进行更改的话,只需要修改applicatoin.properties文件,在配置文件中加入:
server.port=8003