spring-boot - 在非 spring-boot 应用程序中从 spring-boot-actuator 公开缓存端点
问题描述
我正在使用非 spring-boot 应用程序,但我需要公开将返回应用程序中配置的缓存的端点。我看到了这篇文章,但它适用于 spring-boot-actuator 版本 1.X,我使用的是 spring-boot-actuator 版本 2.1.3.RELEASE,因为缓存端点在此版本中可用。
解决方案
您是否尝试将以下内容添加到 application.yml 文件中?
management:endpoints.web.exposure.include: ["caches", etc....`]
management.endpoint.caches.enabled:true
推荐阅读
- python - Python3 asyncio:对多个连接使用无限循环并正确关闭连接
- java - 无法创建Java虚拟机。ubuntu终端上的错误
- java - java - 在方法签名与方法重载中使用对象作为参数
- microsoft-graph-api - ResourceNotFound 具有正确令牌的 Microsoft Graph Api
- c++ - 获取传入参数的数组的大小
- android - 将android库资源设为私有
- c# - 了解实体框架的多对多关系。为什么我尝试向其中添加更多数据后我的代码会崩溃?
- c++ - 编写带有基本方向运动的图形?
- android - 在协程中切换到 UI 上下文
- ruby-on-rails - 序列化属性的活动管理员自定义过滤器