1. 程式人生 > >spring boot 啟用 actuator

spring boot 啟用 actuator

sco 之前 frame rip ng- cnblogs 127.0.0.1 stat 8.14

    <dependencies>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-config-server</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-starter-eureka</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-web</artifactId>
		</dependency>
<dependency> <groupId>org.tmatesoft.svnkit</groupId> <artifactId>svnkit</artifactId> <version>1.8.14</version> </dependency> </dependencies>

  一定要記得依賴spring-boot-starter-web包。我就是之前沒有加載這個包導致監控查看的頁面一直木有

  http://127.0.0.1:8081/health

{
  description: "Spring Cloud Eureka Discovery Client",
  status: "UP"
}

  http://127.0.0.1:8081/info

{}

  

spring boot 啟用 actuator