How do you maintain java webapps in different staging environments?

后端 未结 13 2588
傲寒
傲寒 2020-12-29 10:23

You might have a set of properties that is used on the developer machine, which varies from developer to developer, another set for a staging environment, and yet another fo

13条回答
  •  梦谈多话
    2020-12-29 11:03

    I just put the various properties in JNDI. This way each of the servers can be configured and I can have ONE war file. If the list of properties is large, then I'll host the properties (or XML) files on another server. I'll use JNDI to specify the URL of the file to use.

    If you are creating different app files (war/ear) for each environment, then you aren't deploying the same war/ear that you are testing.

    In one of my apps, we use several REST services. I just put the root url in JNDI. Then in each environment, the server can be configured to communicate with the proper REST service for that environment.

提交回复
热议问题