ElasticBeanstalk Java, spring active profile

Alex Haider :

I am trying to start a spring boot .jar via AWS ElasticBeanstalk. Everything works fine, with the profile "default". Does anybody know how to set the active profile(spring.profiles.active) for a java ElasticBeanstalk app(not tomcat). I always get "No active profile set, falling back to default profiles: default". Is there a way to directly set vm options?

I already set a "spring.profiles.active" Environment Property in AWS Admin Console, but it doesn't work.

Thanks and Best Regards Alex

Tom G :

The casing is different when set as an Environment Variable versus the command line property. Try setting SPRING_PROFILES_ACTIVE in your EB Configuration.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=451270&siteId=1