-
May 22nd, 2008, 01:46 PM
#1
Does spring support placeholder in <import>
Hi
I am wondering if I can do
<import resource="${spring-file}"/>
I tried but it seem that spring does not do the replacement
-
Jun 24th, 2008, 01:44 PM
#2
Same trouble here! Any directions?
Rgrds,
JV -- julioviegas.com
-
Jun 24th, 2008, 02:21 PM
#3
Mistery solved! DefaultBeanDefinitionDocumentReader.importBeanDefi nitionResource(from code that read xml into bean definitions) uses SystemPropertyUtils.resolvePlaceHolders instead of PropertyPlaceholderConfigurer. I think PropertyPlaceholderConfigurer was not designed to replace placeholders in import elements. Anyway, you can set the placeholder value in a -D java argument or in a environment variable, and voila!
Should I file a JIRA enhancement?
Att,
JV -- julioviegas.com
-
Jun 24th, 2008, 02:23 PM
#4
Another way you can do this is use ant to replace the placeholder during build time. Its good to know that you can also do it through the commandline. I would think this would be nice enhancement to have.
Last edited by umeshajb; Jun 24th, 2008 at 02:29 PM.
-
Jun 24th, 2008, 02:29 PM
#5
My environment does not depends upon ant, so for me it isn't an option...
Rgrds,
JV -- julioviegas.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules