Spring-cloud-config: Create failure analyzer when encrypt.keyStore.* properties in application.yml causes startup failure

Created on 29 Aug 2018  路  3Comments  路  Source: spring-cloud/spring-cloud-config

Description of problem

If you try to set the encrypt.keyStore.* properties in application.yml, you get the following error:

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2018-08-28 20:22:00.550 ERROR 31486 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :


APPLICATION FAILED TO START


Description:

Field rsaProperties in org.springframework.cloud.config.server.config.EncryptionAutoConfiguration$KeyStoreConfiguration required a bean of type 'org.springframework.cloud.bootstrap.encrypt.RsaProperties' that could not be found.

Action:

Consider defining a bean of type 'org.springframework.cloud.bootstrap.encrypt.RsaProperties' in your configuration.

Resources

There is a question on stackoverflow of someone else having a similar issue.

Work-around

Move the encrypt.keyStore.* properties to bootstrap.yml

Code to reproduce the issue

https://github.com/mjohns39/ResumeWebsiteApi/tree/spring-cloud-rsa-issue

enhancement

Most helpful comment

Let's create a failure analyzer that suggests to move the properties to bootstrap.

All 3 comments

This is not a work around, it is the documented proper procedure to put these values in bootstrap

Why would adding the properties in application.yml cause an error then? If anything, shouldn't spring cloud just ignore the properties in application.yml?

Let's create a failure analyzer that suggests to move the properties to bootstrap.

Was this page helpful?
0 / 5 - 0 ratings