如何在AWS上定义弹簧轮廓

问题描述 投票:3回答:2

我已将我的war文件部署在AWS的Elastic Beanstalk上作为java应用程序。

我想在AWS上指定:spring.profiles.active就像我执行时一样:

java -jar -Dspring.profiles.active=prod target/gaming-boost-0.0.1-SNAPSHOT.war

我只能在“配置”上配置“环境属性”

java spring amazon-web-services
2个回答
3
投票

在ElasticBeanStalk中设置以下环境变量

SPRING_PROFILES_ACTIVE=prod

0
投票

看看https://stackoverflow.com/a/39021794/2135973

设置为环境变量与命令行属性时,外壳不同。尝试在EB配置中设置SPRING_PROFILES_ACTIVE。

© www.soinside.com 2019 - 2024. All rights reserved.