best place to put properties file in IBM websphere 8.5?

后端 未结 6 706
说谎
说谎 2020-12-31 16:06

In our existing application properties file is embedded in a jar file ,we decided to move properties file outside of ear(application) , what is the best place to put propert

6条回答
  •  借酒劲吻你
    2020-12-31 16:45

    another solution, which I use, is to add a URL resource reference to your application web.xml. For instance "url/properties".

    Then define URLs in Websphere, using the admin console, to point to "file:///dev.properties", or "file:///test.properties", for example.

    Then at deploy time, map the URL reference to the appropriate websphere URL definition.

    Now, your code can just do a jndi lookup of the URL.

    This has the advantage that you can deploy a single codebase, and customise at deploy time to point to different URLs.

提交回复
热议问题