简体   繁体   English

配置多个应用程序的标准方法

[英]Standard way of configuring multiple application

We've got many java components running on several machines. 我们有许多机器上运行的Java组件。 Mostly web applications (on tomcat), and some are standalone processes. 大多数是Web应用程序(在tomcat上),有些是独立的进程。 Historically, each application uses its own way to configure itself: singleton class, or properties file on disk, or application resource file, etc. By configuration I mean String key-value pairs, that affect application behaviour (eg. folder name to store files, or some timeout, and so on). 从历史上看,每个应用程序都使用自己的方式进行自我配置:单例类,磁盘上的属性文件或应用程序资源文件等。所谓配置,是指影响应用程序行为的字符串键值对(例如,用于存储文件的文件夹名称) ,或某些超时等等)。

Question: Is there a standard (desirably simple and reliable) way to configure many applications in one place ? 问题:是否有一种标准的(希望简单可靠的方法)在一个地方配置许多应用程序?

You could use Redis(distributed key-value store) and write a service to retrieve the configuration entries for the relevant application server there. 您可以使用Redis(分布式键值存储)并编写服务来检索那里相关应用程序服务器的配置条目。

Alternatively if you are using Spring Boot , you can try Spring Cloud Config 或者,如果您使用的是Spring Boot,则可以尝试Spring Cloud Config

If you are using CDI, you can try the DeltaSpike Configuration Mechanism 如果您使用的是CDI,则可以尝试DeltaSpike配置机制

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM