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

The Actuator with Spring Boot 2.X

The new version of Spring Boot Actuator—2.x Actuator, has been introduced with a simplified model, extended capabilities, and better incorporated defaults. In this version, the security model is integrated with the application for simplification. Some more HTTP requests and responses, and Java APIs, have also been added. The newest version also supports CRUD against the model of read-write it had before.

Actuator 2.x defines the extensible model, which is also pluggable and does not depend on MVC. Hence, you can utilize MVC and Web Flux. In the new version, endpoints also come disabled by default. Should you want to turn them all on, you can use the following:

management.endpoints.web.expose = *. 

Or if you do not want to enable all the endpoints, you can simply list the ones you want to enable and let others be. All Actuator endpoints are now also set under /actuator path by default.

Spring Boot 2.x Actuator has also introduced some more built-in endpoints:

  • /conditions: This is simply auto-config renamed
  • /Prometheus: This is also the same as metrics, but it supports a Prometheus server
  • Scheduledtasks: This endpoint provides details of every scheduled task in the application
  • /sessions: This is a list of HTTP sessions using Spring Sessions
  • /threaddump: This endpoint dumps the thread information

Spring Boot 2.x Actuator allows you to manipulate the endpoints in similar ways to previous versions. You can customize them; however, there have been a few changes introduced to the method of customization. This is mostly because 2.x Actuator supports CRUD operations instead of just read and write. And you can also add new endpoints to existing ones, with your own configurations and implementations.

Spring Boot Actuator allows you to manipulate and manage your application very easily.

主站蜘蛛池模板: 平遥县| 彰化市| 新兴县| 屯留县| 南和县| 射洪县| 岑溪市| 嘉黎县| 嘉义市| 宁强县| 合山市| 上犹县| 彭山县| 获嘉县| 化州市| 长丰县| 遂平县| 庐江县| 怀化市| 临城县| 肃宁县| 沈丘县| 辽阳市| 龙川县| 特克斯县| 伊宁市| 抚宁县| 年辖:市辖区| 宝鸡市| 米林县| 平山县| 桃源县| 黄龙县| 贞丰县| 铜陵市| 修武县| 全州县| 长春市| 大足县| 湛江市| 湘西|