Spring Boot - ActuatorYou want to secure the /shutdown endpoint so only authorized users can access it. Which of the following is the best approach?ARename the /shutdown endpoint to /stopBDisable the /shutdown endpoint completelyCExpose /shutdown without any security since it is safeDEnable the /shutdown endpoint and configure Spring Security to restrict accessCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand /shutdown endpoint risks/shutdown can stop the app; it should be protected, not exposed without security.Step 2: Choose best practice for securing sensitive endpointsEnable it if needed but restrict access using Spring Security to authorized users only.Final Answer:Enable the /shutdown endpoint and configure Spring Security to restrict access -> Option DQuick Check:Secure sensitive endpoints with Spring Security [OK]Quick Trick: Secure shutdown with Spring Security, don't expose openly [OK]Common Mistakes:Disabling when shutdown is neededExposing without securityRenaming endpoint doesn't secure it
Master "Actuator" in Spring Boot9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallPerf
More Spring Boot Quizzes API Documentation - SpringDoc OpenAPI setup - Quiz 9hard API Documentation - @Operation annotation for descriptions - Quiz 13medium Advanced Patterns - Feature flags concept - Quiz 13medium Aspect-Oriented Programming - Pointcut expressions - Quiz 6medium Async Processing - Cron expressions for scheduling - Quiz 8hard Caching - @Cacheable for read caching - Quiz 9hard Docker and Deployment - Dockerfile for Spring Boot - Quiz 2easy Docker and Deployment - Dockerfile for Spring Boot - Quiz 12easy Messaging - @RabbitListener for consuming - Quiz 10hard Testing Spring Boot Applications - @DataJpaTest for repository testing - Quiz 2easy