Enabling Production-ready Features
{code-spring-boot}/spring-boot-project/spring-boot-actuator[spring-boot-actuator
] 模块提供了所有 Spring Boot 的可投入生产的功能,启用这些功能的推荐方法,是添加对 spring-boot-starter-actuator
“Starter” 的依赖项。
The {code-spring-boot}/spring-boot-project/spring-boot-actuator[spring-boot-actuator
] module provides all of Spring Boot’s production-ready features.
The recommended way to enable the features is to add a dependency on the spring-boot-starter-actuator
“Starter”.
执行器是一个制造术语,用于代指用于移动或控制物品的某种机械设备,执行器可以由很小的变化产生很大的动作。
An actuator is a manufacturing term that refers to a mechanical device for moving or controlling something. Actuators can generate a large amount of motion from a small change.
若要将执行器添加到基于 Maven 的项目,请添加以下 “Starter” 依赖项:
To add the actuator to a Maven-based project, add the following “Starter” dependency:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
对于 Gradle,使用以下声明:
For Gradle, use the following declaration:
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
}