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

相关推荐
代码之光_19804 分钟前
SpringBoot校园资料分享平台:设计与实现
java·spring boot·后端
科技资讯早知道1 小时前
java计算机毕设课设—坦克大战游戏
java·开发语言·游戏·毕业设计·课程设计·毕设
小比卡丘2 小时前
C语言进阶版第17课—自定义类型:联合和枚举
android·java·c语言
xmh-sxh-13142 小时前
java 数据存储方式
java
liu_chunhai2 小时前
设计模式(3)builder
java·开发语言·设计模式
ya888g3 小时前
GESP C++四级样题卷
java·c++·算法
【D'accumulation】3 小时前
令牌主动失效机制范例(利用redis)注释分析
java·spring boot·redis·后端
小叶学C++3 小时前
【C++】类与对象(下)
java·开发语言·c++
2401_854391083 小时前
高效开发:SpringBoot网上租赁系统实现细节
java·spring boot·后端
Cikiss3 小时前
微服务实战——SpringCache 整合 Redis
java·redis·后端·微服务