Skip to content

__BeanFactoryRegistrations generated file can be too large with a BeanFactory with lots of bean definitions #33126

Closed
@dreamlike-ocean

Description

I have a Spring Boot project with roughly 10k beans. When I use the spring-boot process-aot plugin, the generated code is rejected by javac with the error message Code too large /home/dreamlike/javaCode/leydenPlayground/leyden-spring/target/spring-aot/main/sources/io/github/dreamlike/LeydenSpringMain__BeanFactoryRegistrations.java 10049:15
(this file has about 20k lines).

I’m wondering if this plugin allows for the creation of multiple BeanFactoryRegistration files to avoid this issue? The specific reproduction code can be found in this repository
https://github.com/dreamlike-ocean/leydenPlayground

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)theme: aotAn issue related to Ahead-of-time processingtype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions