我正在尝试将企业 Spring Actuator 加入到我的应用程序中。我在我的 pom.xml 中添加了依赖项:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<version>1.4.2.RELEASE</version>
</dependency>
但是我在尝试访问 /health
端点时收到 404。在线查看后,我了解到我的 POM 中还需要 spring-boot-starter-web
依赖项。我假设我只需要执行器依赖才能让它工作
最佳答案
是的,如果您想通过 HTTP 访问,则需要 web(否则只有 JMX 可用)。
“单击依赖项并选择 Spring Web 和 Spring Boot Actuator。”
关于java - 使用Spring Actuator时是否需要添加Spring Web?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44563862/