1.常见配置文件 xx.yml, xx.properties区别
1)YAML(即yml)(Yet Another Markup Language)
注意:yml key冒号后面一定要跟一个空格,树状结构
application.properties示例:
server.port=8090
server.session-timeout=30
server.tomcat.max-threads=0
server.tomcat.uri-encoding=UTF-8
application.yml示例
server:
port: 8090
session-timeout: 30
tomcat.max-threads: 0
tomcat.uri-encoding: UTF-8
2.如何从官网查看配置文件通用属性
URL:https://docs.spring.io/spring-boot/docs/2.1.3.RELEASE/reference/html/
找到改目录下:X. Appendices>>>A. Common application properties
注意:2.1.3.RELEASE为当时springboot的版本
网友评论