Results 1 to 2 of 2

Thread: One PropertyPlaceholderConfigurer across multiple contexts

  1. #1
    Join Date
    Aug 2004
    Location
    San Jose, CA
    Posts
    24

    Default One PropertyPlaceholderConfigurer across multiple contexts

    I've got several debug flags (properties) that I've consolidated into one properties file. I'd like to use the PropertyPlaceholderConfigurer to replace these properties regardless of which *Context.xml or *-servlet.xml file in which they exist.
    If I declare the bean
    Code:
    <bean id="propertyOverrideConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" lazy-init="false">
            <property name="location">
                <value>WEB-INF/placeholder.properties</value>
            </property>
            <property name="order"><value>1</value></property>
        </bean>
    in the applicationContext.xml, app-servlet.xml doesn't know how to replace the placeholders. However, if I declare the same PropertyPlaceholderConfigurer bean in app-servlet.xml, it works fine.
    I know I'm missing something dumb. Any help would be much appreciated.

    - Justin

  2. #2
    Join Date
    Aug 2004
    Location
    Montréal, Canada
    Posts
    845

    Default

    You must configure one PropertyPlaceholderConfigurer for applicationContext.xml and another for app-servlet.xml.
    HTH
    Omar Irbouh

    Spring Modules Team
    http://irbouh.blogspot.com/

Similar Threads

  1. Replies: 5
    Last Post: Oct 8th, 2006, 12:39 PM
  2. Replies: 1
    Last Post: Feb 25th, 2005, 07:12 AM
  3. Multiple Pages
    By afida in forum Swing
    Replies: 12
    Last Post: Feb 16th, 2005, 08:42 AM
  4. Replies: 3
    Last Post: Dec 14th, 2004, 07:04 AM
  5. Should Contexts themselves be configured by DI?
    By jbetancourt in forum Architecture
    Replies: 5
    Last Post: Sep 1st, 2004, 01:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •