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

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.

主站蜘蛛池模板: 辉县市| 治县。| 读书| 荣昌县| 桑日县| 加查县| 兰溪市| 东海县| 勐海县| 衡水市| 迭部县| 丹江口市| 绩溪县| 工布江达县| 宜宾市| 正镶白旗| 蒙自县| 安庆市| 尉犁县| 漳浦县| 绵阳市| 家居| 南江县| 清苑县| 法库县| 宁陵县| 弥渡县| 安徽省| 西平县| 达拉特旗| 闽清县| 和林格尔县| 无锡市| 满洲里市| 齐齐哈尔市| 和平县| 永嘉县| 佛教| 雅江县| 额敏县| 揭阳市|