Skip to content

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

Closed
@sbrannen

Description

@sbrannen

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.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)theme: aotAn issue related to Ahead-of-time processingtype: documentationA documentation task

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions