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

相关推荐
014-code4 小时前
订单超时取消与库存回滚的完整实现(延迟任务 + 状态机)
java·开发语言
java1234_小锋5 小时前
Java高频面试题:Springboot的自动配置原理?
java·spring boot·面试
末央&6 小时前
【天机论坛】项目环境搭建和数据库设计
java·数据库
枫叶落雨2226 小时前
ShardingSphere 介绍
java
花花鱼7 小时前
Spring Security 与 Spring MVC
java·spring·mvc
言慢行善7 小时前
sqlserver模糊查询问题
java·数据库·sqlserver
专吃海绵宝宝菠萝屋的派大星7 小时前
使用Dify对接自己开发的mcp
java·服务器·前端
大数据新鸟8 小时前
操作系统之虚拟内存
java·服务器·网络
Tong Z8 小时前
常见的限流算法和实现原理
java·开发语言
凭君语未可8 小时前
Java 中的实现类是什么
java·开发语言