Announcement Announcement Module
Collapse
No announcement yet.
Refresh PropertyPlaceholder data at runtime Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Refresh PropertyPlaceholder data at runtime

    Is it possible to reload / refresh the property files that are configured in the PropertyPlaceholder or is it necessary to refresh the complete application context (using ConfigurableApplicationContext) instead?

    Grtz

    Maarten

  • #2
    You need to refresh the whole context, since the replacement happens at the time of the context load/reload. The configurer is a bean factory postprocesor, which runs at that time.

    Comment


    • #3
      I think you will need to refresh the complete application context, because the properties from the PropertyPlaceHolderConfigurer are set in the beans in the configuration. After that a lot of initialization can happen (eg. afterPropertiesSet() call in InitializingBean, which may set other properties in the beans).
      Just reloading the PropertyPlaceHolderConfigurer wouldn't change those properties I guess.

      Comment

      Working...
      X