Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In location attribute of <context:property-placeholder /> SpEL expressions are not evaulated [SPR-11072] #15699

spring-issuemaster opened this issue Nov 6, 2013 · 1 comment


Copy link

@spring-issuemaster spring-issuemaster commented Nov 6, 2013

sibidiba opened SPR-11072 and commented

Given you include an SpEL expression in the location attribute of <context:property-placeholder />, when the context is loaded, then you will get an exception implying the SpEL expression was not evaluated but taken literally. E.g.:

<context:property-placeholder local-override="true" system-properties-mode="OVERRIDE" location="classpath*,config-#{environment['config.environment'] ? environment['config.environment'] : 'embvedded'}.properties,">
Exception in thread "main" org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is class path resource [config-#{environment['config.environment'] ? environment['config.environment'] : 'config'}.properties] cannot be opened because it does not exist
	at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(

See for workaround:

Affects: 3.2.4

2 votes, 1 watchers


This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Jan 12, 2019

Bulk closing outdated, unresolved issues. Please, reopen if still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.