File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Spring and the fly likes Spring Property reading Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring Property reading " Watch "Spring Property reading " New topic

Spring Property reading

Shardul Vyawahare

Joined: Dec 30, 2010
Posts: 8

I m using the Spring 3 in my project. Currently I am reading the property files using java.util.Properties class so every time code runs. It reads the necessary property file every time.
I want the way out that I will read the property files once. So I was thinking of creating POJO for every property file and initiating POJO in Application Context. This will work fine but problem is if I changed the property file at run time it should come in affect without restarting tomcat . is it possible in Spring that property file will be read only if it changed otherwise it will use existing loaded context ?

I agree. Here's the link:
subject: Spring Property reading
It's not a secret anymore!