0

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?

yaja6021
  • 141
  • 2
  • 16
  • 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 Answers1

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.