Java platform: how to manage configuration settings for each developer

Inspired by this question:

How to manage configuration settings for each developer

How can I manage the application configuration settings that should be set for each developer without checking them for initial control on the Java platform?

For example, this is what we are doing now:

  • The data source configuration is stored in the Spring XML configuration file.

  • Currently, each developer edits the file and tries his best not to transfer this file to the original control. Some of us have fixes (diff files) that apply to the code before testing with our local database and removing the patch before checking the code. Other developers manually edit and restore configuration files.

  • Unfortunately, patches are becoming obsolete. People sometimes forget to return their local configuration before committing.

However, my question is not limited to the database connection settings. I would like to find a solution in which every developer can override application configuration settings without changing files with a controlled source.

, , (, JNDI?, ?), )

/?

+5
5

. , . , c:\workspace\config.

, .

+2

, , H2/Hipersonic/JavaDB Ruby. , , . , (JVM, Ruby, Editors) .

, .

+2

(, sample.context.xml) . context.xml , . , svn: ignore, .

== > .

, . , . , .

, : , , , .war. JNDI, spring, <j2ee:jndiLookup>.

+2

. , . , . , , .

, , Rails, , , Java.

+1

, , - , .

. datasource.url, Spring.

ResourceLoader, , , , , , . ( , Spring ResourceBundleMessageSource , , - , ).

, :

-Ddatasource.url=[local-datasource-url]

.

, Swing ( ), -, .

+1

All Articles