I have ssl enabled for my spring boot application. I am fetching the keystore password from AWS Secrets Manager through a class in my application. How do I refer to this password in my application.properties?
Asked
Active
Viewed 1,392 times
0
-
So you want to assign the keystore password value to a property (for eg. password= ) defined in your application.properties, right? – Prashant Goswami Sep 19 '18 at 11:42
-
yes. This is my application.properties file server.port: 8443 server.ssl.key-store: acceptance.p12 server.ssl.key-store-password: ${password} server.ssl.keyStoreType: PKCS12 server.ssl.keyAlias: acc This password I want to fetch from the class – yaja6021 Sep 19 '18 at 13:01
1 Answers
0
Once you get the property value, you can set it in the environment as below:
String password = getPasswordFromKeyStore();
environment.setProperty("password", password);
So it will get assigned to property defined in application.properties file.

Prashant Goswami
- 175
- 10