Backend Development
Spring Boot
Subjective
Oct 03, 2025
How do you implement custom Spring Boot Actuator endpoints?
Detailed Explanation
Create custom actuator endpoint:\n\n@Component\n@Endpoint(id = "custom")\npublic class CustomEndpoint {\n \n @ReadOperation\n public Map customInfo() {\n Map info = new HashMap<>();\n info.put("status", "active");\n info.put("version", "1.0.0");\n info.put("timestamp", Instant.now());\n return info;\n }\n \n @WriteOperation\n public void updateConfig(@Selector String key, String value) {\n // Update configuration\n }\n \n @DeleteOperation\n public void resetConfig(@Selector String key) {\n // Reset configuration\n }\n}
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts