This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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

Win a copy of Java 8 in Action this week in the Java 8 forum!
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
Similar Threads
duplicate generated as a result of foreign keys
How to read a property file from WAR
reloading property files after tomcat has started.
setting classpath for multiple jar files
I need a small project to do with spring and hibernate.