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

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.

主站蜘蛛池模板: 阿克陶县| 通辽市| 绥阳县| 皮山县| 缙云县| 孟村| 古交市| 山阴县| 昔阳县| 根河市| 东阳市| 永州市| 赫章县| 伊金霍洛旗| 遂溪县| 孝感市| 娄烦县| 九江县| 独山县| 潜山县| 前郭尔| 清镇市| 沅陵县| 循化| 寿光市| 称多县| 清流县| 丹棱县| 大渡口区| 沭阳县| 连南| 乌拉特前旗| 江门市| 城固县| 洪雅县| 汉阴县| 乾安县| 常宁市| 内江市| 鄂温| 玉田县|