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

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.

主站蜘蛛池模板: 恩平市| 田阳县| 中西区| 玛纳斯县| 鄂伦春自治旗| 蒙阴县| 沭阳县| 宽城| 榆中县| 桃源县| 林甸县| 新源县| 涟水县| 庄浪县| 霞浦县| 广南县| 海安县| 新密市| 进贤县| 万山特区| 龙游县| 安顺市| 泗洪县| 隆回县| 九龙县| 环江| 尤溪县| 上思县| 西宁市| 万全县| 邵武市| 绥滨县| 江西省| 韩城市| 西安市| 丘北县| 寿光市| 宝清县| 白银市| 达孜县| 新余市|