KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a Spring application-context.xml with PropertyPlaceholderConfigurer to get properties' values from .properties file. Main and test source folders have separate .properties file. The issue is that I need to use environment variables in .properties file. But when I do it in the following way: property.name=${env.SYSTEM_PROPERTY} I'm getting the following error: org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'beanName' defined in class path resource [com/example/applicationContext.xml]: Could not resolve placeholder 'env.SYSTEM_PROPERTY' while placeholder configurer defined as <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="location" value="classpath:com/example/application.properties"/> </bean> Any ideas how-to make property.name be interpreted as environment variable (and not as placeholder)? Best regards, Dmitriy.
Tags (comma-separated)
Save Edits
Cancel