Reputation: 851
Where do I put a property that every @Controller can read/access in Spring MVC?
For example, I want to set a flag such as DEBUG_MODE = 1, then read this flag from my code to do something.
Upvotes: 0
Views: 83
Reputation: 750
You may use spring @Value annotation and put the property in the properties file check out this question Spring @Value annotation in @Controller class not evaluating to value inside properties file
answer by Boris Treukhov
Upvotes: 1