ElasticBeanstalk Java,Spring活动配置文件 [英] ElasticBeanstalk Java, spring active profile

查看:102
本文介绍了ElasticBeanstalk Java,Spring活动配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过AWS ElasticBeanstalk启动spring boot .jar.一切正常,配置文件为默认".是否有人知道如何为Java ElasticBeanstalk应用程序(而非tomcat)设置活动配置文件(spring.profiles.active).我总是收到未设置有效的配置文件,回退到默认配置文件:默认".有没有办法直接设置虚拟机选项?

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?

我已经在AWS管理控制台中设置了一个"spring.profiles.active"环境属性,但是它不起作用.

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

感谢和最好的问候 亚历克斯

Thanks and Best Regards Alex

推荐答案

设置为环境变量和命令行属性时,大小写不同.尝试在EB配置中设置SPRING_PROFILES_ACTIVE.

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

这篇关于ElasticBeanstalk Java,Spring活动配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆