Closed dreamstar-enterprises closed 1 month ago
Thanks for reaching out, and I'm sorry that you are having difficulty, @dreamstar-enterprises.
I think this part of the error message offers a hint:
Invalid bean definition with name 'clientRegistrationRepository' defined in class path resource [com/example/authorizationserver/auth/security/repositories/ClientRegistrationRepository.class]: factory-bean reference points back to the same bean definition
It indicates that it's complaining about a bean of yours (which also happens to be named ClientRegistrationRepository
) and not a Security bean. If I were to guess, your ClientRegistrationRepository
is a Spring Data bean, so the complaint is about Spring Data not being able to post-process that repository.
First, I'd try ensuring that your bean is of a different name from the one produced by Spring Security.
If that doesn't work, I'd recommend that you post this question to StackOverflow with a tag of spring-data
so that the Spring Data maintainers and community see it and can help you get to the bottom of it. You also may find https://github.com/spring-projects/spring-framework/issues/20330 helpful.
Thanks Josh, another helpful post - so thank you. I think this may be because in the reactive version, I put 'reactive' infront of the bean names, and in the servlet, I may have created conflicting beans with the same name. Will try to tackle this again, later today, and feedback on progress.
It worked! I changed the bean name, and also was careful with the class name that contained it (making sure the names were not the same). Thank you.
For some reason, when I do this
I keep getting this:
But when I keep the bean in the same main config class, the error goes away. It's NOT an issue with the Webflux server
So, I'm guessing this is a bug?
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior.
Expected behavior A clear and concise description of what you expected to happen.
Sample
A link to a GitHub repository with a minimal, reproducible sample.
Reports that include a sample will take priority over reports that do not. At times, we may require a sample, so it is good to try and include a sample up front.