您的位置:首页 > 编程语言 > Java开发

Spring Boot Server 配置

2017-07-05 00:00 232 查看
如果修改spring boot 默认端口号及上下文

可以通过在application.properties中增加以下内容进行配置:

########################################################
###server
########################################################
#spring boot 默认端口号为8080,可以通过server.port进行修改
server.port=8081
#spring boot 默认上下文为/,可以通过server.context-path进行修改
server.context-path=/spring-boot


通过application.properties还可以配置server的其它信息

#session超时时间
#server.session-timeout= # session timeout in seconds
#servlet访问路径
#server.servlet-path= # the servlet path, defaults to '/'
#Tomcat的最大线程数
#server.tomcat.max-threads = 0 # number of threads in protocol handler
#Tomcat url的编码格式
#server.tomcat.uri-encoding = UTF-8 # character encoding to use for URL decoding


另可以参观以下贴子了解其它配置信息:
http://www.cnblogs.com/softidea/p/6068128.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  spring Spring Boot Server