Handling of configuration files in Spring web applications

前端 未结 3 1845
南方客
南方客 2021-02-06 00:11

I have several times ran into the same problem, and I would like to have some input on what other people think about the issue: Suppose we have Spring application packaged as a

3条回答
  •  囚心锁ツ
    2021-02-06 00:57

    Database

    Developers can't touch a WAR once it goes to an environment where I work, so if we need to change a configuration value without re-deploying we put it in a relational database.

    Those don't require a repackaging, redeployment, or bounce of a server. The app does have to refresh read-only configuration periodically, though.

    JNDI

    JNDI settings remain fixed from environment to environment; those changes are set up once by the app server admin and don't change. (See Oracle Tutorial)

    I'm talking about name/value pairs for configuration for the app itself, not JNDI.

提交回复
热议问题