SpringBoot框架---配置

1、更改tomcat的端口号:

application.properties 配置文件中,

server.port=9090

2、设置上下文路径:

server.servlet.context-path=/abc   

3、设置session的存活时间:

server.servlet.session.timeout=1800
//最大线程数
server.tomcat.max-threads=800
//编码格式=UTF-8
server.tomcat.uri-encoding=UTF-8

4、static 下放静态资源:

直接放在static路径下,即可查看

原文地址:https://www.cnblogs.com/minmin123/p/11304868.html