How do you maintain java webapps in different staging environments?

后端 未结 13 2589
傲寒
傲寒 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 10:56

    Caleb P and JeeBee probably have your fastest solution. Plus you don't have to setup different services or point to files on different machines. You can specify your environment either by using a ${user.name} variable or by specifying the profile in a -D argument for Ant or Maven.

    Additionally in this setup, you can have a generic properties file, and overriding properties files for the specific environments. Both Ant and Maven support these capabilities.

提交回复
热议问题