Properties for dev and production

前端 未结 4 813
天涯浪人
天涯浪人 2021-01-06 17:12

I have a GlassFish/j2ee application, and I develop on one box, and production is a remote box. I have a function that makes files, and I need the files\' location to be diff

4条回答
  •  南方客
    南方客 (楼主)
    2021-01-06 18:00

    You can use a properties file and externalize environment specific stuff (like your "file location") in this configuration file. Put the adequate value in it at build time (e.g. using filtering and profiles with Maven). Include this file in the application or make it available somewhere on the classpath.

提交回复
热议问题