不使用Spring Boot实现Spring Boot 2 Actuator

6

我想在我的现有Spring MVC 5应用程序中添加Spring Boot actuator指标(我无法转换为Spring Boot)。 在SO上有一些已回答的问题(Spring Boot Actuator without Spring Boot),但它们是针对使用Spring Boot Actuator 1.x的。 Spring Boot Actuator 2.x已经重新架构,因此这些说明不再有效。 是否有人将Spring Boot Actuator 2.x集成到标准Spring MVC 5应用程序中?


请查看此处的类似问题:https://dev59.com/a10a5IYBdhLWcg3wxrON 希望能对您有所帮助。 - codereal
1
如果您查看我的帖子,您会发现我已经引用了该链接并表示它仅适用于Spring Boot Actuator 1.x。 - Piers Geyman
@PiersGeyman 我也想在没有Spring Boot的情况下使用“Spring Boot 2 Actuator”模块,你有什么解决方法吗?谢谢 - nikhil
1个回答

0

很遗憾,您无法在不需要Spring Boot的情况下使用Spring Boot Actuator。Spring Boot是Spring Boot Actuator项目的Maven依赖项(名称也表明需要Spring Boot)。

您可以在spring-boot-actuator的pom文件中查看实际依赖项


我认为第一个执行器也依赖于Spring Boot,但它仍然可以用于旧的Spring应用程序,所以我认为你的答案并不完全正确。(https://github.com/spring-projects/spring-boot/blob/1.5.x/spring-boot-actuator/pom.xml) - Vadim Kirilchuk
spring-boot 在 1.x 版本中也是一个依赖项,但仍然可以使用 actuator。 - Druckles

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接