-
-
Notifications
You must be signed in to change notification settings - Fork 756
Open
Labels
questionFurther information is requestedFurther information is requestedwait for replyNeed more information from reporterNeed more information from reporter
Description
Hello,
I would like to know if it is possible add the capability to disable a single controller method by configuration, like as example below:
controllers:
mycontroller:
hello:
enabled: false
and...
import io.micronaut.context.annotation.Requires;
import io.micronaut.http.annotation.Controller;
import io.micronaut.http.annotation.Get;
@Controller("/mycontroller")
public class MyController {
@Requires(property = "controllers.mycontroller.hello.enabled", value = "true")
@Get("/hello")
public String index() {
return "Hello, World!";
}
}
The reason is I would like to configure some api endpoints to not be reachable, while others will be.
Thank you in advance
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requestedwait for replyNeed more information from reporterNeed more information from reporter
Projects
Status
Backlog