如何在spring boot应用程序中检查嵌入式tomcat的运行状况?

Ond*_*šek 5 java apache tomcat health-monitoring spring-boot

任何人都知道如何获取传入线程/队列大小的信息?我想将它包含在运行状况检查中(扩展AbstractHealthIndicator的类).

Wac*_*ira 2

您可以使用Actuator和Micrometer在Spring Boot中获取有关tomcat的数据。但是如果您想要有关线程的信息,您必须在 spring boot 配置文件中配置更多信息。

server.tomcat.mbeanregistry.enabled=true