Java webapp load properties file




















The code that loads up properly file will be added in the next code snippet. I hope this short blog post is helpful to you. If you would like to learn more about Building RESTful Web Services with Java checkout some of the best video courses below or checkout my resources page which has links to video courses and tutorials on different subjects like Maven , Git , Amazon Cloud , Android , Swift and everything you need to know to become a full stack mobile app developer.

Powered by Contextual Related Posts. Your email address will not be published. Save my name, email, and website in this browser for the next time I comment.

FileReader; import java. FileWriter; import java. Enumeration; import java. HashMap; import java. Map; import java. Asked 8 years, 6 months ago. Active 8 years, 6 months ago. Viewed 2k times. Have you already read this question? I had some code of my own doing this until I realized it was easier to let spring read my properties files.

You can pass in file locations as jvm arguments and override a base set of properties. Best of all the properties are injectable. Add a comment. Active Oldest Votes.

Rahul Rahul From the OP's comment loading is from the class path. Boris the Spider Boris the Spider You can try this as well. Sign up or log in Sign up using Google. Sign up using Facebook.



0コメント

  • 1000 / 1000