Saf*_*azi 1 spring spring-boot spring-boot-actuator
我从 spring 站点(https://spring.io/guides/gs/actuator-service)下载了这个示例,我遵循了相同的步骤,但是如果我调用这个 URL
显示http://localhost:9000/health spring启动错误页面
spring boot 版本是1.4.1,应该是 {"status":"UP"},有什么建议吗?
应用程序属性
server.port: 9000
management.port: 9001
management.address: 127.0.0.1
Run Code Online (Sandbox Code Playgroud)
POM文件
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework</groupId>
<artifactId>gs-actuator-service</artifactId>
<version>0.1.0</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.1.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
<java.version>1.8</java.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Run Code Online (Sandbox Code Playgroud)
日志:
根据您在 application.properties 文件中的配置,将使用管理地址和端口访问执行器端点,请尝试使用此链接访问它们 -
编辑:启动应用程序时,您应该能够在控制台中看到执行器详细信息,如下所示 -
| 归档时间: |
|
| 查看次数: |
5068 次 |
| 最近记录: |