当前位置: 动力学知识库 > 问答 > 编程问答 >

jbossfuse - Fuse Fabric: How to read and maintain a configuration PID per environment?

问题描述:

I have configured a fabric profile app-ticketing with the configuration PID using the maven plugin that bundles the dependencies and the configuration PID's. When the camel context is initialized and the camel route starts up it the configuration from the PID file for connection settings port numbers etc. The camel polling route is configured automatically startup as soon as the profile is deployed to a container.

We have 3 environments DEV, QA and Production with different connection parameters, port numbers etc.

How to I setup the profile such that it determines the current environment and uses a different PID file for example com.example.ticketing.dev.properties if it is the DEV environment instead of having to edit the PID everytime I need to deploy to a different environment.

网友答案:

I have posted a feature for this using fabric8:maven:plugin , please refer to the example at https://github.com/sundarmr/camelexamples/tree/master/camel-examples/camel-envbased-props . See if this fits your usecase.

分享给朋友:
您可能感兴趣的文章:
随机阅读: