【发布时间】:2016-05-16 17:19:50
【问题描述】:
我有一个基于 Spring Cloud 的应用程序,将 Spring 会话存储在 Redis 中。它使用带有嵌入式 tomcat 的 Spring Boot。
使用弹簧执行器时,/metrics 端点不会返回任何有价值的信息。 httpsessions.active 设置为 0,httpsessions.max 设置为 -1。
我猜这是因为 spring 用自己的 spring session 实现替换了 httpsession 实现。
有没有办法从某个端点访问这些信息?最好使用 JMX,但不是强制性的。
谢谢。
【问题讨论】:
-
这是唯一的workaround I have found。对于 spring boot 执行器来实现这种功能会很好,因为在 spring boot 应用程序中启用 tomcat 管理器似乎是no easy way。
标签: spring-boot spring-session spring-data-redis spring-boot-actuator