springboot关于application的一些配置

 首先在官网文档查找关键字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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值