在Java中加载Web应用程序特定配置和设置的首选方法是什么 [英] What's the preferred way to load web application specific configuration and settings in java

查看:179
本文介绍了在Java中加载Web应用程序特定配置和设置的首选方法是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道在Web应用程序中加载应用程序设置的常用方法是什么。我只是环顾四周,因为我只需要这一次,我们要求用户指定环境变量,路径设置为我们在spring上下文中加载的配置文件。我的观点不是加载(无论是xml还是属性),而是文件的位置和位置,你认为是什么首选方式。



Marek

解决方案

放置属性用户的主目录中的$ c>文件是一个不错的选项


I was wondering what is the usual way for you to load application settings in web applications. I'm just 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

这篇关于在Java中加载Web应用程序特定配置和设置的首选方法是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆