Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3968366
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:50:02+00:00 2026-05-20T03:50:02+00:00

One option for building is to package the environment-specific properties at build time (for

  • 0

One option for building is to package the environment-specific properties at build time (for example using maven profiles)

Another option is to set -Denv=production on your production environment, and on startup load the /${env}/config.properties. (spring allows that for example, but it can be done manually)

I’ve used both. The former means no additional environment configuration. The latter allows for using the same build on multiple environments.

The question: any other significant pros/cons, or is it virtually the same which approach will be chosen?

Related: Load environment-specific properties for use with PropertyPlaceholderConfigurer?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T03:50:02+00:00Added an answer on May 20, 2026 at 3:50 am

    In my opinion having different outputs per environment is a major downside, as it means you need to build N copies of the app, run the same build commands N times, etc. It’s too easy to run into mistakes where you gave the “dev” version to the QA site, etc.

    There’s a bit of a third option in between which I am a fan of – storing the configuration values on the servers themselves, separate from the application, and the application then either is written to know where to find these configuration files or you have some sort of script which “re-configures” the app by replacing tokens in it’s configuration files with the canonical values from the external files.

    This way you can ship the same binary for all environments, and the external configurations can easily be placed under source control (for example, one file per environment) so changes can be audited, changes can be propagated automatically, etc.

    This is also a convenient option if you work in a large organization where the developers are separate from the group that “operates” the application or is responsible for the different environments – since with this method, developers can know what to configure, but the other group is responsible for what configuration values to supply on each host.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having a Zend_Form with a Zend_Form_Element_Select on it, i can set ONE option selected
I'm currently building a Drupal website in an Active Directory environment. One of the
I'm currently developing multiple web applications using Spring. I'm using Maven for building and
In Delphi you have a build all option when building a project group. However
I am building a plugin which has a option where a user can set
I have to give one option in my website to upload multiple files and
I want to add a Select One option to a drop down list bound
How can one update an attribute value in DynamoDB table to ? one option
I have this control (see picture). I like when check one option in this
I am trying to implement OpenID as one preferred option to my next web

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.