启用生产就绪功能

spring-boot-actuator模块提供了Spring Boot的所有生产就绪功能。启用这些功能的最简单方法是为spring-boot-starter-actuator“Starter” 添加依赖项。

执行器的定义

致动器是制造术语,指的是用于移动或控制某物的机械装置。执行器可以通过一个小的变化产生大量的运动。

要将执行器添加到基于Maven的项目,请添加以下“Starter”依赖项:

1
2
3
4
5
6
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>

对于Gradle,请使用以下声明:

1
2
3
dependencies {
compile("org.springframework.boot:spring-boot-starter-actuator")
}