문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top