开发者

What's the preferred way to load web application specific configuration and settings in java

I was wondering what is the usual way for you to load application settings in web applications. I'm ju开发者_JAVA百科st looking around because I had only needed this once and we required user to specify environment variable with path set to the configuration file which we loaded in the spring context. My point is not the loading (whether xml or properties) but the location and locating of the file, what do you think is the preferred way.

Regards,

Marek


Placing properties file in User's home directory is a good option


It depends, but storing settings either in a properties text file locally, or in a database table are two common ways.


We usually populate the JNDI environment in the context descriptor.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜