Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

86
Views
Load Spring application.profiles from S3

I have a multi-environment system for which I have spring profiles assigned. I'd like to be able to assign those profiles based on an environment specific application.properties file.

So far, everything I've read about being able to add additional resource path to spring involves creating a bean and overriding or altering PropertySourcesPlaceholderConfiguration. This however, happens AFTER spring loads profiles (and a few other properties which I'd like to dynamically set).

Is there any way to tell Spring to look for application.properties in S3 prior to it doing anything else?

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Create a script to run your application that:

  1. Download the appropriate file from s3. Something like (or any other method):

    s3 cp s3://mybucket/custom.properties custom.properties

  2. Run your app with -Dspring.config.location

    java -jar your-jar.jar -Dspring.config.location=custom.properties

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!