Refer properties in Spring expression language
I have a field as shown below which works
@Value("#{T(java.util.regex.Pattern).compile('[0-9]+')}")
private Pattern myPattern;
But if I change it to
@Value("#{T(java.util.regex.Pattern).compile('${myProp}')}")
private Pattern myPattern;
it does not work. Is there a way to refer properties inside Spring
expression?
No comments:
Post a Comment