I have deployed my war file on AWS's Elastic Beanstalk as a java app.
I want to specify on AWS : spring.profiles.active like I do when I execute:
java -jar -Dspring.profiles.active=prod target/gaming-boost-0.0.1-SNAPSHOT.war
I can only configure "Environment Property" on "Configuration"
Profiles work in conjunction with Spring Boot properties files. By default, Spring Boot parses a file called application. properties – located in the src/main/resources directory – to identify configuration information.
The default profile is always active. Spring Boot loads all properties in application. yml into the default profile. We could rename the configuration file to application-default. yml and it would work the same.
Set below environment variable in ElasticBeanStalk
SPRING_PROFILES_ACTIVE=prod
Take a look at https://stackoverflow.com/a/39021794/2135973
The casing is different when set as an Environment Variable versus the command line property. Try setting SPRING_PROFILES_ACTIVE in your EB Configuration.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With