I have zuul proxy which uses the property to validate tokens as a resource server
security.oauth2.resource.jwt.key-value
I have public key as part of the key value, however my application is dynamically fetching the public key from a vault. I am looking for a way to dynamically update this value in application.yml or application.properties file at runtime. If i understand correctly updating the property value should not reload the application.
How do i do this dynamically, below is my attempt to update the proprety.
Properties properties = new Properties();
properties.put("security.oauth2.resource.jwt.key-value", publicKey);
application.setDefaultProperties(properties);
application.run(args);