如果修改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