Is it bad practice to include properties/configuaration files within jars?

前端 未结 11 1024
谎友^
谎友^ 2021-02-07 00:34

For example:

MyApp is a web app that contains a properties file (server.properties) that describes config data (e.g. server names) for the app. In the development phase

11条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-07 01:07

    Remember, that in J2EE, you are NOT guaranteed to be able to access files from outside the J2EE environment (no direct file access).

    You would have to use JNDI to point to a datasource containing your data, or a properties file in your deployment artifacts.

    Websphere, for example, doesn't allow direct file access by default.

提交回复
热议问题