【发布时间】:2020-03-15 20:34:21
【问题描述】:
在我的 Spring Boot 应用程序中,我在 application.properties 文件中维护了 spring.datasource.url。我需要保护 URL/用户和密码,并且这些值在 AWS 参数存储中可用。我引用了这个doc 只是简单地添加了对 (spring-cloud-starter-aws-parameter-store-config) 启动模块的依赖来激活支持。我实际上不知道如何维护配置参数以及如何将参数存储值检索到我的项目中。
如何在不使用以下 (application.properties) 属性中的硬编码值的情况下实现此目的?
spring.datasource.url= url
spring.datasource.username = root
spring.datasource.password = xxxxxx
【问题讨论】:
标签: java spring-boot aws-parameter-store