Hi,
I am developing a simple web application using spring mvc. I am struggling to inject a property from a properties file to a field in Controller class. The changes I have done are:
in root-context.xml:
Code:
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="locations">
            <list>
                <value>classpath*:/config/env/env.properties</value>
            </list>
        </property> 
        <property name="ignoreUnresolvablePlaceholders" value="true"/>
    </bean>
in servlet-context.xml:
Code:
<context:component-scan base-package="...file.web"/>
I am able to get the basic flow working from jsp to controller and back. But If I try to inject some property in the controller, it fails:
Code:
@Value("#{propertyConfigurer.outputFilePath}")
    private String outputFilePath;
or
Code:
@Value("#{propertyConfigurer['outputFilePath']}")
    private String outputFilePath;
Kindly help me inject some property value using annotation