I am loading properties file using spring
<bean id="appProperties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations" value="classpath:/sample.properties" />
<property name="ignoreUnresolvablePlaceholders" value="true"/>
</bean>
when i am getting property value using
@Value("${testkey}")
its working fine.
but when i am trying to get using env
@Resource
private Environment environment;
environment.getProperty("testkey") // returning null