Question

This question isn't in regards to how to get/read the properties files, but instead what is the standard or accepted location to keep them. Specifically, I've got two types of properties, one that is sort of a server config file and a couple that are written to and read from to contain information sent to/from a client. So where should these be placed?

Était-ce utile?

La solution

What do you see as the options?

Config files should be on the classpath, unless they need to be trivially modifiable. If they do, then they should be in a location external to the app, and the location set by either default, a JNDI string, a system property, or whatever.

Files that are regularly updated as part of system operation must be external, and configured in the same way. Although I'd question whether or not it makes sense to do that kind of persistence with a file.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top