Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我为我的 Spring Boot 应用程序启用了 ssl。我正在通过我的应用程序中的一个类从 AWS Secrets Manager 获取密钥库密码。如何在我的 application.properties 中引用此密码?
获得属性值后,您可以在环境中设置它,如下所示:
String password = getPasswordFromKeyStore(); environment.setProperty("password", password);
因此它将被分配给 application.properties 文件中定义的属性。