Results 1 to 2 of 2

Thread: Default Property Values and PropertyPlaceholderConfigurer

  1. #1
    Join Date
    Apr 2005
    Posts
    2

    Default Default Property Values and PropertyPlaceholderConfigurer

    when the PropertyPlaceholderConfigurer is used, the default properties (defined in the bean code) get overridden by the values that are defined in the properties file. If the properties file did not exist, the bean will not be crezted. I would like to make the properties file optional. Also looked at the PropertyOverrideConfigurer. Still can't figure out how to make the bean work with default values when the properties file is absent. Any clue is greatly appreciated.

    Thanks,

    Ashwath Akirekadu

  2. #2
    Join Date
    Apr 2005
    Posts
    2

    Default The answer

    Got it working now. I had to use a different syntax in the properties file.

    While using PropertyOverrideConfigurer you don't use the ${...} format in application context XML. You can define the actual value for the property or simply have no entry for that property if you intend to use the default values defined in the bean code itself.

    The syntax for the properties file is:

    Code:
    beanName.propertyName=value

    ------
    Ashwath Akirekadu

Similar Threads

  1. Replies: 2
    Last Post: Sep 19th, 2005, 04:09 AM
  2. Replies: 1
    Last Post: Jul 28th, 2005, 05:08 PM
  3. Replies: 2
    Last Post: Jul 26th, 2005, 09:47 AM
  4. Replies: 2
    Last Post: May 13th, 2005, 05:42 AM
  5. Replies: 2
    Last Post: May 5th, 2005, 09:35 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
  •