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 小时前
【Spring】Spring MVC核心原理与RESTful最佳实践详解
spring·mvc·restful
hashiqimiya14 小时前
springboot事务触发滚动与不滚蛋
java·spring boot·后端
因我你好久不见14 小时前
Windows部署springboot jar支持开机自启动
windows·spring boot·jar
TeamDev15 小时前
基于 Angular UI 的 C# 桌面应用
前端·后端·angular.js
PPPHUANG15 小时前
一次 CompletableFuture 误用,如何耗尽 IO 线程池并拖垮整个系统
java·后端·代码规范
用户83562907805115 小时前
用Python轻松管理Word页脚:批量处理与多节文档技巧
后端·python
无关868815 小时前
SpringBootApplication注解大解密
spring boot
想用offer打牌15 小时前
一站式了解Spring AI Alibaba的流式输出
java·人工智能·后端
秋说15 小时前
华为 DevKit 25.2.rc1 源码迁移分析使用教程(openEuler + ARM64)
后端
ServBay15 小时前
C# 成为 2025 年的编程语言,7个C#技巧助力开发效率
后端·c#·.net