-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Native support for RetryTemplateFactory as it uses reflections to access the field logger of RetryTemplate #2439
Comments
same for me..I solved it by adding to
|
Hey @AlexGreg thanks that you also commented this issue! Exactly this needs to be provided by spring-cloud-config-client 👍 Edit: As this is a Spring Boot project the existing |
@ryanjbaxter - should we do it this way or should I provide a |
@ryanjbaxter - I made a suggestion as this is a Spring Project I guess we are safe to use a RuntimeHintsRegistrar. See the PR for more information, please. |
@OlgaMaciaszek / @ryanjbaxter - sorry that I ask you directly for assistance, again. We are currently using Spring Cloud Config with Spring Retry and without the changes I suggested at Spring Cloud Config Client it can’t be used within a Spring Boot Native image without defining additional reflect definitions. The changes are rather small and I only moved an existing class to its own file and added reflection hints to classes mentioned in this issue. I would be very grateful if you could review those changes and may include them in one of the next releases. |
Hi @klopfdreh Thanks for reporting the issue. Will fix it shortly. |
@OlgaMaciaszek I fixed it already - just review and merge if everything is fine for you: #2456 |
Thanks @klopfdreh - done. |
Describe the bug
We wanted to use Spring Cloud Config Client within a native image. During the startup of our application we saw a
NullPointerException
We had a look into
RetryTemplateFactory
and sawfield = ReflectionUtils.findField(RetryTemplate.class, "logger");
in line 31 andfield.set(retryTemplate, log);
in line 47.There is no reflect-config.json provided to describe this access.
Sample
N/A
The text was updated successfully, but these errors were encountered: