Skip to content

Spring circular reference checking breaks custom spring data repos #2442

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

Closed
symposion opened this issue Feb 15, 2022 · 1 comment
Closed
Labels
status: duplicate A duplicate of another issue

Comments

@symposion
Copy link

It's a common requirement to be able to inject the main repository interface into the implementation class of a custom repository interface. It requires a bit of care with the class naming but it has always worked fine. See e.g. this SO answer: https://stackoverflow.com/a/52892536

Since upgrading from Spring Boot 2.5.7 to 2.6.3, the latest circular reference checking in Spring complains that this is a circular reference (which it kind of is), and the only way to get the app to boot up is to turn off the circular reference checking entirely. It seems like there should be some sort of exception/special case for this Spring Data use case. Apologies if this ought to be raised against spring core/framework, it's not clear to me where this needs to be fixed.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 15, 2022
@mp911de
Copy link
Member

mp911de commented Feb 21, 2022

This is a duplicate of spring-projects/spring-data-commons#2319.

@mp911de mp911de closed this as completed Feb 21, 2022
@mp911de mp911de added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged labels Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants