Results 1 to 3 of 3

Thread: Use a MessageSource for Configuration Properties??

  1. #1
    Join Date
    Aug 2008
    Posts
    14

    Default Use a MessageSource for Configuration Properties??

    I have a number of property files in an application and Im planning to use a MessageSource to retrieve them in my application.

    Can anyone see any problems with using a MessageSource to manage all property files in an application whether they contain content strings, configuration or otherwise??

  2. #2
    Join Date
    Jul 2010
    Location
    Venice, Italy
    Posts
    709

    Default

    You should use MessageSource only for i18n purposes as it's for what it was designed in the first place. To load your external configuration, use PropertyPlaceholderConfigurer.

  3. #3
    Join Date
    Aug 2008
    Posts
    14

    Default

    Thanks for the thought Enrico.

    I have a couple of configuration properties that are used all over the application and I dont really want to inject them into every bean that might refer to them though.

    Im after something like Reloadable MessageSource but for configuration properties.

Tags for this Thread

Posting Permissions

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