首先在官网文档查找关键字basename 因为basename好记也比较的少容易搜索 也可以查找Part X. Appendices之后下面全都是一些关于application的配置
日志logging的配置
logging.level.root=级别
logging.level.org.springframework.web=级别
logging.level.org.hibernate=级别
springboot配置 tomcat 端口 上下文路径 字符集
server.port=8888
server.context-path=/sboot
server.tomcat.uri-encoding=UTF-8
spring.http.encoding.charset=UTF-8
actuator 健康检查
启用 健康检查首先需要引入一个依赖
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
添加好依赖之后可以 通过以下一些路径可以进行查看你的一些安全检查东西
#关闭actutor的安全认证
#http://localhost:8080/sboot/health 查看springboot健康状况是否良好
#http://localhost:8080/sboot/beans 类似于struts<s:debug>
#http://localhost:8080/sboot/dump dump出线程和内存使用情况
#http://localhost:8080/sboot/env java和springboot的环境变量
management.security.enabled=false
#启动url shutdown
endpoints.shutdown.enabled=true