|
From: Juergen H. <ju...@in...> - 2005-02-09 19:42:15
|
PropertyPlaceholderConfigurer is an implementation of the BeanFactoryPostProcessor interface: This interface and its sibling BeanPostProcessor just apply to the BeanFactory that defines them, that is, to the application context that defines them. If you combine multiple config files into a single contextConfigLocation, a PropertyPlaceholderConfigurer defined in any of the files will apply to all of the files, because they are loaded into a single application context. However, a DispatcherServlet has its own application context, just using the root web application context as parent. Therefore, it needs to define its own BeanFactoryPostProcessors and/or BeanPostProcessors, in this case its own PropertyPlaceholderConfigurer. I believe that this is the better general solution: Each application context might want to resolve its placeholders against its own properties files, where applying PropertyPlaceholderConfigurer from parent contexts would interfere. Juergen -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of Magnus Heino Sent: Tuesday, February 08, 2005 3:56 PM To: spr...@li... Subject: [Springframework-developer] PropertyPlaceholderConfigurer and *-servlet.xml Hi. How come a PropertyPlaceholderConfigurer defined in applicationContext.xml does not replace properties in *-servlet.xml files? I have to cut&paste the bean definition of PropertyPlaceholderConfigurer to my app-servlet.xml file. I can reference all other beans in app-servlet.xml that are defined in applicationContext.xml, but is seems as if the PropertyPlaceholderConfigurer is not seen by the app-servlet.xml Is this behaviour documented and ok, or is this a bug? /Magnus ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |