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这个版本的变化还挺大的,增加了不少实用功能,如果能升级,可以用用新属性

相关推荐
二哈赛车手21 小时前
新人笔记---ApiFox的一些常见使用出错
java·笔记·spring
candyTong1 天前
Claude Code 的 Edit 工具是怎么工作的
javascript·后端·架构
GetcharZp1 天前
GitHub 2.4 万 Star!D2 正在重新定义程序员画图方式
后端
阿维的博客日记1 天前
Nacos 为什么能让配置动态生效?(涉及 @RefreshScope 注解)
java·spring
辰海Coding1 天前
MiniSpring框架学习-完成的 IoC 容器
java·spring boot·学习·架构
zhangxingchao1 天前
多 Agent 架构到底怎么选?从 Claude Agent Teams、Cognition/Devin 到工程落地原则
前端·人工智能·后端
IT_陈寒1 天前
SpringBoot那个自动配置的坑,害我排查到凌晨三点
前端·人工智能·后端
ServBay1 天前
OpenCode 和它的7款必备插件
后端·github·ai编程
ping某1 天前
逐字节拆解 tcpdump
后端
阿凡9807301 天前
花 100 dollar,用 Claude 打通 EasyEDA&Fusion 双向同步
后端·程序员