Use the following commands to build run the application:
$ mvn clean package
$ java -jar target/livelessons-operations-actuator-extensions-1.0.0-SNAPSHOT.jar
The WeatherEndpoint
shows how you can easily add actuator endpoints by writing a bean
that implements the Endpoint
interface (in this case by extending AbstractEndpoint
).
You can access in the same way as the standard ones (HTTP, SSH, JMX).
The WeatherMvcEndpoint
shows how you can also write specific extensions to be used
when the endpoint is accessed over HTTP. In this case we are adding a content type
support. If you open http://localhost:8080/weather in a browser you will see red text,
if you use curl
you don’t see any HTML markup.