@Value
is returning null as I am trying to read properties.
Below is my configuration:
<util:properties
id="applicationProps"
location="/WEB-INF/spring/application.properties" />
Below is the code that I have in a custom tag:
private @Value("#{applicationProps.staticResourceUrl}") String staticResourceUrl;
Custom tag lifecycle is not usually handled by spring but one thing you can do is extend
org.springframework.web.servlet.tags.RequestContextAwareTag
and do
in the
doStartTagInternal()
method.