Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-15533

@target PointCut causes unrelated beans to be proxied

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.3.4
    • Fix Version/s: General Backlog
    • Component/s: Core:AOP
    • Labels:
    • Last commented by a User:
      true

      Description

      When @target is used in a PointCut, all beans created in the same context are proxied, although that PointCut does not match those beans.

      This bug was already mentioned and according to that ticket also fixed (https://jira.spring.io/browse/SPR-2168), but this behavior is still present in later versions of Spring.

      In our application context some beans cannot be proxied. These beans cannot be modified, so usage of @target PointCuts breaks our application. However, not using @target is also not possible, as our use case requires Aspects to be applied to all methods of a wide range of classes (including inherited and interface methods). Our desired behavior for aspects could not be implemented with other PointCut definitions.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              juergen.hoeller Juergen Hoeller
              Reporter:
              donguyen Thao-Nguyen Do
              Last updater:
              Spring Issues Spring Issues
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Days since last comment:
                3 years, 29 weeks, 6 days ago