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

相关推荐
灵魂猎手23 分钟前
3. MyBatis Executor:SQL 执行的核心引擎
java·后端·源码
Undoom30 分钟前
虚拟机一站式部署Claude Code &可视化UI界面
后端
Asthenia041233 分钟前
建好了表,还在手动写CRUD的xml?兄弟,真得学习MBG了!
后端
楽码1 小时前
底层技术SwissTable的实现对比
数据结构·后端·算法
还是大剑师兰特1 小时前
Spring面试题及详细答案 125道(1-15) -- 核心概念与基础1
spring·大剑师·spring面试题·spring教程
m0_480502641 小时前
Rust 入门 泛型和特征-特征对象 (十四)
开发语言·后端·rust
程序员爱钓鱼2 小时前
Go语言实战案例-使用ORM框架 GORM 入门
后端
M1A12 小时前
TCP协议详解:为什么它是互联网的基石?
后端·网络协议·tcp/ip
一枚小小程序员哈2 小时前
基于微信小程序的家教服务平台的设计与实现/基于asp.net/c#的家教服务平台/基于asp.net/c#的家教管理系统
后端·c#·asp.net
楽码3 小时前
自动修复GoVet:语言实现对比
后端·算法·编程语言