Skip to content

Ignore container callback and marker interfaces for auto-proxy decisions [SPR-11416] #16043

Closed

Description

@spring-projects-issues

Juergen Hoeller opened SPR-11416 and commented

Spring's auto-proxy creation infrastructure currently switches to a target-class proxy only if it has been explicitly requested or if no interfaces are being implemented at all. We should be smarter here and ignore container callback and marker interfaces for that decision, falling back to a target-class proxy even when BeanFactoryAware, InitializingBean etc are the only interfaces being implemented.


Affects: 4.0.1

Issue Links:

Referenced from: commits 9493380

Activity

  1. spring-projects-issues commented on Feb 12, 2014

    @spring-projects-issues
    CollaboratorAuthor

    Sam Brannen commented

    Please note that the resolution of this issue prior to #14113 may cause CGLIB-related memory issues to become more common in transactional integration testing scenarios, since subclasses of AbstractTransactionalJUnit4SpringContextTests and AbstractTransactionalTestNGSpringContextTests will now be proxied by class instead of via the ApplicationContextAware interface.

  2. added this to the 4.0.2 milestone on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type: enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions