July 2018
Intermediate to advanced
336 pages
9h 23m
English
The @ReadOperation annotation will expose the Getter for the custom endpoint and the @WriteOperation will expose the Setter for the custom endpoint. The endpoint will be mapped under the http://<host>:<port>/actuator/custom URL (the default host is localhost, and the default port is 8080 unless configured otherwise) and also exposed as a JMX Management bean:
@Component@Endpoint(id = "custom")public class CustomEndpoint { private final static Logger LOGGER = LoggerFactory.getLogger(CustomEndpoint.class); @ReadOperation public String get() { return "Custom Endpoint"; } @WriteOperation public void set(String message) { LOGGER.info("Custom Endpoint Message {}", message); }}
Read now
Unlock full access