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

Property placeholder in factory bean is not resolved [SPR-15630] #20189

Open
spring-projects-issues opened this issue Jun 6, 2017 · 0 comments
Open
Labels
in: core type: enhancement

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Jun 6, 2017

Jeronimo Spuri Murguia opened SPR-15630 and commented

When using a property placeholder to select a factory bean the property placeholder is not resolved.

This configuration:

1. app.properties
factory=helloFactory
<context:property-placeholder location="classpath:app.properties"/>
<bean id="helloFactory" class="HelloFactory" />
<bean id="hello" factory-bean="${factory}" factory-method="buildHello"/>

Results in:

WARNING: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named '${factory}' available
Exception in thread "main" org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named '${factory}' available

Affects: 4.3.8

Reference URL: https://github.com/jspurim/spring-framework-issues/tree/master/SPR-15630

1 votes, 2 watchers

@spring-projects-issues spring-projects-issues added type: enhancement in: core labels Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core type: enhancement
Projects
None yet
Development

No branches or pull requests

1 participant