Home | 简体中文 | 繁体中文 | 杂文 | Search | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 作品与服务 | Email

5.3. application.properties

5.3.1. server

server.port=8080 # 监听端口
server.address= # 绑定的地址
server.session-timeout= #session有效时长
server.context-path= #默认为/
server.ssl.* #ssl相关配置
			

5.3.1.1. tomcat

server.tomcat.basedir=/tmp
server.tomcat.access-log-pattern= # log pattern of the access log
server.tomcat.access-log-enabled=false # is access logging enabled
				

5.3.2. charset

Spring boot 默认并非UTF-8 所以下面配置必设,否则将会出现

spring.messages.encoding=UTF-8
server.tomcat.uri-encoding=UTF-8
spring.http.encoding.charset=UTF-8
spring.http.encoding.enabled=true
spring.http.encoding.force=true
			

5.3.3. JSON

# Pretty-print JSON responses
spring.jackson.serialization.indent_output=true
			

5.3.4. SMTP 相关配置

spring.mail.host=smtp.netkiller.cn
#spring.mail.username=
#spring.mail.password=
#spring.mail.properties.mail.smtp.auth=true
#spring.mail.properties.mail.smtp.starttls.enable=true
#spring.mail.properties.mail.smtp.starttls.required=true		
mail.smtp.debug=true
			
comments powered by Disqus