@RefreshScope with @ConditionalOnProperty does not work
问题 Problem Exploring an option of enabling/disabling a @RequestMapping endpoint on demand without restarting JVM. Implement a kill switch on a endpoint at runtime. Attempt I've tried the following but @RefreshScope does not seem to work with @ConditionOnProperty @RestController @RefreshScope @ConditionalOnProperty(name = "stackoverflow.endpoints", havingValue = "enabled") public class MyController { @Value("${stackoverflow.endpoints}") String value; @RequestMapping(path = "/sample", method =