我已将我的 war 文件作为 Java 应用程序部署在 AWS 的 Elastic Beanstalk 上。
我想在 AWS 上指定:spring.profiles.active,就像我在执行时所做的那样:
java -jar -Dspring.profiles.active=prod target/gaming-boost-0.0.1-SNAPSHOT.war
我只能在“配置”上配置“环境属性”
最佳答案
在ElasticBeanStalk中设置以下环境变量
SPRING_PROFILES_ACTIVE=prod
关于java - 如何在 AWS 上定义 spring profile,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41616279/