I have the below spring configuration:
<context:property-placeholder location="classpath:commonSql.properties" />
Now in my class, when I use @value("#{someproperty}")
it did not work. Then, I changed to
@value("${someproperty}")
and it worked.
According to answer of this questions @value("#{someproperty}")
is SpEL syntax, which is far more capable and complex. It can also handle property placeholders, and a lot more besides but in my case why it's not working ? While the simple one is working how both $ and # are use to evaluate the value.
The main thing is @value("#{someproperty}")
is not working while @value("${someproperty}")
is working.