spring_reference/V. Spring Boot Actuator/39. Enabling production-rea...

22 lines
939 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

### 39. 开启production-ready特性
[spring-boot-actuator](http://github.com/spring-projects/spring-boot/tree/master/spring-boot-actuator)模块提供了Spring Boot所有的production-ready特性。启用该特性的最简单方式就是添加对spring-boot-starter-actuator Starter POM的依赖。
**执行器Actuator的定义**:执行器是一个制造业术语,指的是用于移动或控制东西的一个机械装置。一个很小的改变就能让执行器产生大量的运动。
基于Maven的项目想要添加执行器只需添加下面的'starter'依赖:
```xml
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
```
对于Gradle使用下面的声明
```java
dependencies {
compile("org.springframework.boot:spring-boot-starter-actuator")
}
```