During startup, we need to do some adjustments for the application. We want to make REST API temporarily unavailable to be sure that there will be no concurrent updates. After adjustment is done, we would like to enable REST API and start serving requests. Is it possible to disable temporary REST API in Spring Boot?
Asked
Active
Viewed 1,462 times
2
-
You might look into https://stackoverflow.com/questions/29958231/can-a-spring-boot-restcontroller-be-enabled-disabled-using-properties or (https://www.togglz.org/) if you would like to do this on demand. – I_AM__PAUL Mar 05 '21 at 10:17
-
1In this case, we would need to add @ConditionalOnExpression annotation to each REST endpoint and also it won't allow us to enable/disable them in runtime. – Sydorov Mar 05 '21 at 10:29
-
Which deployment env do you use? – FishingIsLife Mar 07 '21 at 21:23
-
Didn't get the question. I need it for all envs – Sydorov Mar 08 '21 at 16:43
-
@Sydorov found any thing ? searching for the same..! – Bhanuchander Udhayakumar Sep 07 '22 at 12:40
-
Is there any solution for this? – Usha Feb 03 '23 at 13:46