From the course: Advanced Spring: Spring Boot Actuator

Unlock the full course today

Join today to access over 24,200 courses taught by industry experts.

Creating a custom Actuator endpoint

Creating a custom Actuator endpoint - Spring Boot Tutorial

From the course: Advanced Spring: Spring Boot Actuator

Creating a custom Actuator endpoint

- [Instructor] Spring Boot Actuator also empowers us with the ability to create our own custom endpoints. We may need to create a custom endpoint for our release notes, which consists of a list of bug fixes, and new features implemented in our application, or maybe we need to monitor our Jira server, or any other external service that our application may depend upon. To do so, we would need to create a new component and annotate it with the @Endpoint annotation. And then we'll pass in an Id, which would be the name of the path that we want our custom endpoint to point to. In our application, we're calling it custom. Also, we'll need to add the @ReadOperation annotation to signify the type of CAD operation that we're performing. In this case, we annotated with @ReadOperation, which signifies a get request. Finally, we would go to Postman and trigger that endpoint. Now, if it was a post request, we would use the @Write…

Contents