Springboot3.5.x版本actuator新属性

前言

Springboot3.5.x版本发布之后,下载heapdump文件需要配置,使其更加安全

示例

1、创建一个Springboot3.5.x版本

2、加入actuator相关包

xml 复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

3、开启配置

ini 复制代码
server.port=8011
spring.profiles.active=dev
spring.application.name=demo-actuator

management.endpoints.web.exposure.include=*
management.endpoint.health.show-details=always

4、访问

bash 复制代码
http://localhost:8011/actuator/info

输出

5、这个时候访问

bash 复制代码
http://localhost:8011/actuator/heapdump

输出 6、开启heapdump配置 在application-dev.yml开启配置

yaml 复制代码
management:
    endpoint:
      heapdump:
        access: unrestricted

访问

bash 复制代码
http://localhost:8011/actuator/heapdump

会下载

总结

Spring Boot3.5.x这个版本的变化还挺大的,增加了不少实用功能,如果能升级,可以用用新属性

相关推荐
华仔啊14 分钟前
3 分钟让你彻底搞懂 Spring 观察者和发布者模式的本质区别
java·后端
言之。15 分钟前
LiteLLM:让LLM调用变得简单统一
后端·python·flask
驰羽23 分钟前
[GO]golang接口入门:从一个简单示例看懂接口的多态与实现
开发语言·后端·golang
ZhengEnCi29 分钟前
Python_try-except-finally 完全指南-从异常处理到程序稳定的 Python 编程利器
后端·python
程序员小假2 小时前
我们来说一说 Redisson 的原理
java·后端
白衣鸽子2 小时前
数据库高可用设计的灵魂抉择:CAP权衡
数据库·后端
xyy1232 小时前
SixLabors.ImageSharp 使用指南
后端
xiangzhihong82 小时前
Spring Boot集成SSE实现AI对话的流式响应
人工智能·spring boot
阑梦清川3 小时前
docker部署tomcat和nginx
后端