简体   繁体   English

如何在wso2中添加外部配置详细信息

[英]How to add external configuration details in wso2

I want to add RabbitMQ localhost, port, username, password details directly in wso2, instead of sending through a Java program. 我想直接在wso2中添加RabbitMQ本地主机,端口,用户名,密码详细信息,而不是通过Java程序发送。

I've a Java webservice (which will produce war file). 我有一个Java网络服务(它将产生war文件)。 As of now we've mentioned in the workflow.properties in Main/resources/ . 到目前为止,我们已经在Main/resources/中的workflow.properties中提到过。

Now when there is a change in RabbitMQ details, every time I've to update the war file. 现在,当RabbitMQ详细信息发生更改时,每次我都要更新war文件时。 Instead I want to handle this in ws02 side. 相反,我想在ws02端处理此问题。

Well you can't get this done directly from ESB Since your service is a external webservice. 那么您不能直接从ESB完成此操作,因为您的服务是外部Web服务。 There are wo ways you can do this. 您可以通过多种方式做到这一点。

  1. Read the configurations from a external file and use them in your webapp.Then you only need to change this file and not the whole war file. 从外部文件中读取配置,然后在您的web应用程序中使用它们。然后,您只需要更改此文件,而无需更改整个war文件。
  2. Save the necessary configurations in the Registry (Which comes with WSO2 ESB) and then access the Registry resources from there. 将必要的配置保存在注册表中(WSO2 ESB随附),然后从那里访问注册表资源。 You can refer this . 你可以参考这个

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

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