Child pages
  • Best Practices-Properties Files
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Properties Files

User-Specific Properties Files

You can have any number of Properties.username files in your project's Resources directory in-addition-to the default Properties file. These Properties.username files will automatically load based on which user is launching the application. This allows you to have custom logging, email, database, etc configuration settings for each developer.

This capability can also be (ab)used in combinination with the Launch parameter -Duser.name to specify Production vs Staging/Development properties. For example: a launch parameter of -Duser.name=deployment will cause Properties.deployment to be read when the application in launched.

This can be very useful for automatically changing database connection configurations based on whether or not an application is being run in Production or Development.

Development Only Properties File

You can set properties that will only be active if the project is run in Development mode by creating a Properties.dev file. It will be loaded for all users.

  • No labels