springboot配置文件application.properties更新记录(自学使用)

#应用名称
spring.application.name=demo

#应用根目录
server.context-path=/demo

#应用端口
server.port=8084

#错误页,指定发生错误时,跳转的URL
#server.error.path=/error

#tomcat的URI编码
server.tomcat.uri-encoding=utf-8

#tomcat最大连接数,默认为10000
#server.tomcat.max-connections=8000

#tomcat最大线程数,默认为200
#server.tomcat.max-threads=150

#session最大超时时间(分钟),默认为30分钟
server.session-timeout=60
#server.servlet.session.timeout=60m

#该服务绑定IP地址,启动服务器时如本机不是该IP地址则抛出异常启动失败
#server.address=192.168.1.1

#强制使用utf8编码,mvc编码输入输出设置
spring.http.encoding.force=true
spring.http.encoding.charset=utf-8
spring.http.encoding.enabled=true

#数据源配置 mysql8 使用com.mysql.cj.jdbc.Driver驱动,PS:serverTimezone=GMT需要加上,不然服务器时间不能同步
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/mysql?serverTimezone=GMT&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8
spring.datasource.username=root
spring.datasource.password=
spring.datasource.max-idle=10
spring.datasource.max-wait=10000
spring.datasource.min-idle=5
spring.datasource.initial-size=5

posted @ 2019-10-15 10:59  稚语希听  阅读(490)  评论(0编辑  收藏  举报