首页 文章

弹性beanstalk Spring Boot Array属性

提问于
浏览
0

我需要将一些配置传递给我的Spring Boot应用程序,该应用程序使用弹性beanstalk进行部署 .

不幸的是,我需要更新这些变量而不重新编译工件,所以我想使用带有下划线表示法的大写(http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/java-configuration.html) . 不幸的是,配置更复杂,实际上我正在尝试将对象数组传递给它(属性文件/ yaml - https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html#boot-features-external-config-loading-yaml中支持) . 但属性语法需要括号( [ ] ) .

有什么办法,如何解决这个问题(不重写应用程序)?

1 回答

  • 0

    据我说,以下应该工作:

    • 添加aws documentation中记录的所有外部属性

    • 使用@value注释在spring boot应用程序中使用这些属性 . 如果您看到spring documentation订单9/10的属性来源应该获取您的属性的值 .

相关问题