配置设置的中央存储 [英] Central Store for Configuration Settings

查看:67
本文介绍了配置设置的中央存储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我工作的公司的软件架构中,我们有很多小型应用程序,主要是服务器(约12个)和几个客户端.每个都有自己的配置文件.这些设置中的许多设置都是重复的.我们想创建一个用于存储,维护和分发这些设置的应用程序(可能是Web服务),以便我们拥有一个值的副本,而不是很多相同的值.有没有人做过此事或对最佳前进方式有任何建议?我们认为这将简化跨环境的部署.

Within the software archtiecture of the company where I work we have lots of small apps, mainly server (about 12) and a couple of clients ones. Each one has its own config file. A lot of the settings within these are duplicated. We would like to create one app (probably a web service) which is used to store, maintain and distribute these settings so we have one copy of the values rather than lots of the same. Has anyone ever done this before or have any advice on the best way forward? We think it would make deployments across environments a lot easier.

推荐答案

创建和使用配置文件很简单.毕竟,它不过是XML.我写了几篇文章,可能会帮助您解决问题:

覆盖多个对象的App.Config设置 [在应用程序之间共享用户设置 [
It''s a simple matter to create and use a config file. Afterall, it''s nothing more than a XML. I''ve written a couple of articles that might help you with your problem:

Overriding App.Config Settings for Multiple Objects[^]

Share User Settings Between Applications[^]

One of the classes used in those articles handles reading and validating data from a config file.


这篇关于配置设置的中央存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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