You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PropertyPlaceholder fails to replace the placeholder in the XML Config files when they are in @ImportResource annotation of a JavaConfig.
I have one test which is a JavaConfig class and it uses @ImportResource to import one XML Config file importContext.xml, however, PropertyPlaceholder does not replace any placeholder (e.g. ${TEST}) in importContext.xml. Next, I add <import resource="importContext.xml"> in the root XML Config file, but PropertyPlaceholder still does not work. Finally, I remove @ImportResource from my JavaConfig class, and PropertyPlaceholder works.
I think it is a bug in JavaConfig. Please see my test case in the attachment.
I download the latest snapshot spring-framework-3.0.1.CI-565, however, the bug still there. If you run the test case that I attached in the jira, you can see the bean importBean still has ${TEST} as its value, and ${TEST}was not replaced by its property.
Liu, Yinwei David opened SPR-6645 and commented
PropertyPlaceholder fails to replace the placeholder in the XML Config files when they are in
@ImportResource
annotation of a JavaConfig.I have one test which is a JavaConfig class and it uses
@ImportResource
to import one XML Config file importContext.xml, however, PropertyPlaceholder does not replace any placeholder (e.g. ${TEST}) in importContext.xml. Next, I add <import resource="importContext.xml"> in the root XML Config file, but PropertyPlaceholder still does not work. Finally, I remove@ImportResource
from my JavaConfig class, and PropertyPlaceholder works.I think it is a bug in JavaConfig. Please see my test case in the attachment.
Affects: 3.0 GA
Attachments:
Issue Links:
1 votes, 2 watchers
The text was updated successfully, but these errors were encountered: