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

Document that circular dependencies should be avoided in AOT mode #33786

Closed
sbrannen opened this issue Oct 24, 2024 · 0 comments
Closed

Document that circular dependencies should be avoided in AOT mode #33786

sbrannen opened this issue Oct 24, 2024 · 0 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) theme: aot An issue related to Ahead-of-time processing type: documentation A documentation task
Milestone

Comments

@sbrannen
Copy link
Member

Add a new subsection to the Best Practices section to explain that circular dependencies should be avoided for AOT-proccessed Spring applications.

Specifically, circular dependencies that work in standard JVM mode (such as @Autowired fields and methods) do not work in AOT mode unless a @Lazy resolution proxy is used.

See MockitoSpyBeanAndCircularDependenciesWithLazyResolutionProxyIntegrationTests for an example.

@sbrannen sbrannen added type: documentation A documentation task in: core Issues in core modules (aop, beans, core, context, expression) theme: aot An issue related to Ahead-of-time processing labels Oct 24, 2024
@sbrannen sbrannen added this to the 6.2.0 milestone Oct 24, 2024
@sbrannen sbrannen self-assigned this Oct 24, 2024
@sbrannen sbrannen modified the milestones: 6.2.0, 6.1.15 Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) theme: aot An issue related to Ahead-of-time processing type: documentation A documentation task
Projects
None yet
Development

No branches or pull requests

1 participant