Skip to content

Avoid unnecessary CGLIB processing on configuration classes #34486

Description

@jhoeller

If a @Configuration class does not declare (or inherit) any instance-level @Bean methods, generating an enhanced subclass with CGLIB is not adding any value. This is particularly likely for "holder"-like configuration classes with just imports, not least of it all common @SpringBootApplication classes. We can entirely skip CGLIB processing for such classes, also not incurring unnecessary potential for CGLIB class cache failures/fallbacks (#34423).

Activity

  1. added
    in: coreIssues in core modules (aop, beans, core, context, expression)
    on Feb 25, 2025
  2. added this to the 6.2.4 milestone on Feb 25, 2025
  3. self-assigned this
    on Feb 25, 2025
  4. added a commit that references this issue on Feb 25, 2025
    aff9ac7
  5. added a commit that references this issue on Feb 25, 2025
    ea419d2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchestype: enhancementA general enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions