Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6856417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:52:59+00:00 2026-05-27T01:52:59+00:00

I have a base class with several derived classes that extend it. I want

  • 0

I have a base class with several derived classes that extend it.
I want to restrict my Spring AOP Aspect to the superclass only, so that the AOP Proxy would be created for it only and not for the derived classes.

I tried to define the pointcut as follows:

@Pointcut("execution(* com.blah.platform.persistence.generic.GenericDaoImpl.*(..))")
public void withinGenericDao() {}

where GenericDaoImpl is the superclass.

I still can see that proxies are generated for the derived classes as well:

2011-11-24 18:00:28,616 ContainerBackgroundProcessor[StandardEngine[Catalina]] DEBUG [JdkDynamicAopProxy] Creating JDK dynamic proxy: target source is SingletonTargetSource for target object [com.blah.admin.persistence.impl.CircuitDAOImpl@5c81cf46]
2011-11-24 18:00:28,638 ContainerBackgroundProcessor[StandardEngine[Catalina]] DEBUG [JdkDynamicAopProxy] Creating JDK dynamic proxy: target source is SingletonTargetSource for target object [com.blah.admin.persistence.impl.CategoryDAOImpl@55eef3c1]
2011-11-24 18:00:28,645 ContainerBackgroundProcessor[StandardEngine[Catalina]] DEBUG [JdkDynamicAopProxy] Creating JDK dynamic proxy: target source is SingletonTargetSource for target object [com.blah.admin.services.circuit.impl.CircuitsServiceImpl@d50112d]
2011-11-24 18:00:28,953 ContainerBackgroundProcessor[StandardEngine[Catalina]] DEBUG [JdkDynamicAopProxy] Creating JDK dynamic proxy: target source is SingletonTargetSource for target object [com.blah.events.persistence.impl.EventsDAOImpl@4222023a]
2011-11-24 18:00:29,030 ContainerBackgroundProcessor[StandardEngine[Catalina]] DEBUG [JdkDynamicAopProxy] Creating JDK dynamic proxy: target source is SingletonTargetSource for target object [com.blah.events.persistence.impl.PrototypesDAOImpl@d3bef50]

I would think that this should only happen when the pointcut is defined as follows:

execution(public * com.mycompany.myservice.MyService+.*(..))

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T01:52:59+00:00Added an answer on May 27, 2026 at 1:52 am

    Can you change your PointCut definition from execution to within? I have had success with that in the past. (Note that the syntax is a little different. See the Spring AOP reference documentation for details.)

    e.g. @PointCut("within(com.blah.platform.persistence.generic.GenericDaoImpl)")

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have a Base class and several Derived classes. Is there any
I have a base class and several derived classes. The derived classes use some
I have a common assembly/project that has an abstract base class, then several derived
I have a base class and several subclasses derived from that base class. I
I have a base class and several concrete classes that derive from it. Lets
I have a base abstract class with several classes which extend and override it,
I have a base class B and several derived template classes D<int> , D<float>
I have a base class where I derive several classes. I have another class
I have base class BaseClass and derived classes DerivedA , DerivedB , and DerivedC
I have a Base Class, called primitive Graphics. derived from this class are several

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.