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

fix: use dependsOn to force bean dependency #3098

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

cromoteca
Copy link
Contributor

Fixes #3092

Copy link

codecov bot commented Dec 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.57%. Comparing base (567ad7e) to head (3fdfb76).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3098   +/-   ##
=======================================
  Coverage   92.57%   92.57%           
=======================================
  Files          85       85           
  Lines        3164     3164           
  Branches      775      775           
=======================================
  Hits         2929     2929           
  Misses        183      183           
  Partials       52       52           
Flag Coverage Δ
unittests 92.57% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cromoteca cromoteca changed the title Use dependsOn to force bean dependency fix: use dependsOn to force bean dependency Dec 30, 2024
@@ -154,6 +155,7 @@ private static ObjectMapper createDefaultEndpointMapper(
* @return the endpoint invoker
*/
@Bean
@DependsOn("hillaEndpointObjectMapper")
Copy link
Member

Choose a reason for hiding this comment

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

This ensures that the bean named ”hillaEndpointObjectMapper” is created before this bean, right? But what ensures that that particular mapper is used here and not some other ObjectMapper in the project?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a qualifier

Copy link
Member

Choose a reason for hiding this comment

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

Should the same qualifier be used here

public SignalsConfiguration(EndpointInvoker endpointInvoker,
?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think so

Copy link
Member

Choose a reason for hiding this comment

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

is the whole DependsOn now unnecessary, as it requires the specific Hilla object mapper?

Copy link

sonarqubecloud bot commented Jan 3, 2025

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.

Spring ai module affect bean creation order of hillaEndpointObjectMapper and endpointInvoker
2 participants