Announcement Announcement Module
Collapse
No announcement yet.
Change properties Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Change properties

    I have a problem,

    I have configured PropertyPlaceholderConfigurer, which changes some properties values in the beans.

    I'm loading context using ClassPathXmlApplicationContext.

    And It works fine.

    But if I want to change some properties, I'm loading them using ClassPathResource, to the Properties; edit them; store back to the same resource.
    Physically file is updated.

    To udpate context I load again it using ClassPathXmlApplicationContext and it should create beans using new property file, but for some reason it doesn't, It uses old file.

    I've tried to make some research, even loading through ClassPathResource gives me old properties. For some reason It holds that properties in cache or whatever.

    If I restart whole application it works with new properties.
Working...
X