How to maintain Java webapps in different segmentation environments?

You may have a set of properties that are used on the developer machine, from developer to developer, another set for a staging environment and another set for a production environment

In spring applications, you can also load beans in the local environment, but not in the production environment, and vice versa

What do you do with this? Do you use separate files, ant / Maven resource filtering or other methods?

Solution

I just put various attributes in JNDI In this way, each server can be configured, and I can have a war file

If you are creating different application files (War / ear) for each environment, you will not deploy the same war / ear as the test

In one of my applications, we used several rest services I just put the root URL in JNDI In each environment, the server can then be configured to communicate with the appropriate rest services for that environment

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>