springboot配置文件Tomcat和mvc详细配置

tomcat相关配置参数 (ServerProperties)

server.port=8080

server.address= # bind to a specific NIC

server.session-timeout= # session timeout in seconds

server.context-path= # the context path, defaults to '/'

server.servlet-path= # the servlet path, defaults to '/'

server.tomcat.access-log-pattern= # log pattern of the access log

server.tomcat.access-log-enabled=false # is access logging enabled

server.tomcat.protocol-header=x-forwarded-proto # ssl forward headers

server.tomcat.remote-ip-header=x-forwarded-for

server.tomcat.basedir=/tmp # base dir (usually not needed, defaults to tmp)

server.tomcat.background-processor-delay=30; # in seconds

server.tomcat.max-threads = 0 # number of threads in protocol handler

server.tomcat.uri-encoding = UTF-8 # character encoding to use for URL decoding

springmvc相关配置参数 (HttpMapperProperties)

http.mappers.json-pretty-print=false # pretty print JSON

http.mappers.json-sort-keys=false # sort keys

spring.mvc.locale= # set fixed locale, e.g. en_UK

spring.mvc.date-format= # set fixed date format, e.g. dd/MM/yyyy

spring.mvc.message-codes-resolver-format= # PREFIX_ERROR_CODE / POSTFIX_ERROR_CODE

spring.view.prefix= # MVC view prefix

spring.view.suffix= # ... and suffix

spring.resources.cache-period= # cache timeouts in headers sent to browser

spring.resources.add-mappings=true # if default mappings should be added

相关推荐
倚肆6 分钟前
Spring Boot CORS 配置详解:CorsConfigurationSource 全面指南
java·spring boot·后端
q***721910 分钟前
Spring Boot(快速上手)
java·spring boot·后端
CoderYanger20 分钟前
C.滑动窗口——1423. 可获得的最大点数
java·开发语言·算法·leetcode·1024程序员节
Swift社区25 分钟前
StackOverflowError 栈溢出的原因与实战解决方案
java·spring boot·spring
字节拾光录1 小时前
手机号存储避坑指南:从20亿级数据库实践看,为什么VARCHAR才是终极答案
java·数据库·oracle
p***97611 小时前
SpringBoot(7)-Swagger
java·spring boot·后端
j***29481 小时前
springboot集成onlyoffice(部署+开发)
java·spring boot·后端
叫致寒吧5 小时前
Tomcat详解
java·tomcat
S***26759 小时前
基于SpringBoot和Leaflet的行政区划地图掩膜效果实战
java·spring boot·后端