首页 > 解决方案 > 在非 spring-boot 应用程序中从 spring-boot-actuator 公开缓存端点

问题描述

我正在使用非 spring-boot 应用程序,但我需要公开将返回应用程序中配置的缓存的端点。我看到了这篇文章,但它适用于 spring-boot-actuator 版本 1.X,我使用的是 spring-boot-actuator 版本 2.1.3.RELEASE,因为缓存端点在此版本中可用。

标签: spring-bootspring-mvcspring-boot-actuator

解决方案


您是否尝试将以下内容添加到 application.yml 文件中?

management:endpoints.web.exposure.include: ["caches", etc....`]
management.endpoint.caches.enabled:true

推荐阅读