To enable feature flag on controller level I will use for example ConditionalOnProperty annotation to give me options to control it via properties sth like this.
@RestController
@ConditionalOnProperty(name = "featureFlag", havingValue = "true", matchIfMissing = false)
public class TestController {
@GetMapping()
public String echo(@RequestParam String message) {
return message;
}
}
How do I disable only the echo method, and not the whole controller?