官术网_书友最值得收藏!

Enabling Spring Boot's Actuator in your application

To enable Spring Boot Actuator in your application, you will have to add Spring Boot Actuator dependency in your package manager. This is the simplest way to enable the production-ready features in your Spring application, by adding a Starter dependency, spring-boot-starter-actuator.

Let's add the Actuator to a Maven-based project as follows in your Spring Boot project:

<dependencies>
   <dependency>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-actuator</artifactId>
   </dependency>
</dependencies> 

The preceding Maven script will enable the production-ready features that are Spring Boot's Actuator. Now let's see how to enable the Actuator with a Gradle-based project.

Let's use the following declaration:

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

The preceding "Gradle script will enable the production-ready features in your Spring application.

After enabling the production-ready features, let's see what all the endpoints are that Spring Boot's Actuator provides.

主站蜘蛛池模板: 吕梁市| 靖宇县| 九江县| 临泽县| 呼和浩特市| 武平县| 景洪市| 威宁| 容城县| 九台市| 威宁| 凤冈县| 眉山市| 镇原县| 凤冈县| 紫金县| 进贤县| 绥芬河市| 无为县| 抚松县| 冷水江市| 柳江县| 丰镇市| 克拉玛依市| 新疆| 七台河市| 龙岩市| 霍州市| 光山县| 子洲县| 尤溪县| 波密县| 达拉特旗| 赤水市| 榆中县| 望谟县| 定结县| 桓仁| 南汇区| 崇义县| 开封县|