Spring boot08 之修改application.properties

来源:互联网 发布:元数据的作用 编辑:程序博客网 时间:2024/06/16 09:53

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

0 0
原创粉丝点击