Skip to content
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

Consistently handle proxied beans in DgsSchemaProvider #1786

Merged
merged 1 commit into from
Jan 19, 2024

Conversation

kilink
Copy link
Member

@kilink kilink commented Jan 19, 2024

Ensure that we are consistently handling proxied beans in DgsSchemaProvider by refactoring some of the logic to retrieve annotated methods; after fetching DgsComponent-annotated beans, use a new internal wrapper class, DgsBean, that correctly handles proxies, and includes a helper method to retrieve all methods decorated with a particular annotation. In addition to making the handling consistent, moving the logic to the DgsBean wrapper class avoids repeated unwrapping of proxies and allocations.

Fixes #1163

@kilink kilink force-pushed the consistent-proxy-handling branch 2 times, most recently from 99603ae to e2fa6db Compare January 19, 2024 06:46
Copy link
Contributor

@srinivasankavitha srinivasankavitha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was there an issue that this PR fixes or just general improvement?

Ensure that we are consistently handling proxied beans in DgsSchemaProvider by
refactoring some of the logic to retrieve annotated methods; after fetching
DgsComponent-annotated beans, use a new internal wrapper class, DgsBean, that
correctly handles proxies, and includes a helper method to retrieve all methods
decorated with a particular annotation. In addition to making the handling consistent,
moving the logic to the DgsBean wrapper class avoids repeated unwrapping of proxies
and allocations.
@kilink kilink force-pushed the consistent-proxy-handling branch from e2fa6db to 39ae61a Compare January 19, 2024 18:30
@kilink
Copy link
Member Author

kilink commented Jan 19, 2024

Was there an issue that this PR fixes or just general improvement?

There was an issue reported with proxies here: #1163

@kilink kilink merged commit 734ad67 into master Jan 19, 2024
3 checks passed
@kilink kilink deleted the consistent-proxy-handling branch January 25, 2024 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: @DgsCodeRegistry not applied if bean is wrapped by Spring proxy
2 participants