How to set default context-param values for ServletContextPropertyPlaceholderConfigurer?
-
27-10-2019 - |
Question
How to set default boolean
values with ServletContextPropertyPlaceholderConfigurer
? For example, I want property to have false
value if it is not set as <context-param>
Solution
you can always define a default value for every place where the property configurere "inject" some value.
The default synax is ${propertyName:default}
So for example:
${myContextParam:false}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow