Note that there are some explanatory texts on larger screens.

plurals
  1. POCreating PointCut for all classes extending an abstract class
    primarykey
    data
    text
    <p>I have two Classes </p> <p>com.home.learn.TryImpl1 &amp; </p> <p>com.home.learn.TryImpl2 </p> <p>which extends a abstract class com.home.learn.Try.</p> <p>I created a Aspect in spring as </p> <pre><code>&lt;aop:config&gt; &lt;aop:pointcut id="pointcut" expression="execution(* com.home.learn.Try.*(..))" /&gt; &lt;aop:aspect ref="aopDemo"&gt; &lt;aop:around method="around" pointcut-ref="pointcut" /&gt; &lt;/aop:aspect&gt; &lt;/aop:config&gt; </code></pre> <p>But I am getting the following error</p> <pre><code>Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'try' defined in file [C:\Users\admin\workspace\Spring_Aspect_pure_pojo\spring-learn.xml]: Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: net.sf.cglib.proxy.Enhancer.setInterceptDuringConstruction(Z)V Caused by: java.lang.NoSuchMethodError: net.sf.cglib.proxy.Enhancer.setInterceptDuringConstruction(Z)V at org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:178) at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:110) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.createProxy(AbstractAutoProxyCreator.java:429) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:299) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:313) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1181) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352) at org.springframework.context.support.FileSystemXmlApplicationContext.&lt;init&gt;(FileSystemXmlApplicationContext.java:124) at org.springframework.context.support.FileSystemXmlApplicationContext.&lt;init&gt;(FileSystemXmlApplicationContext.java:68) at Main.main(Main.java:10) </code></pre> <p>Can anyone please help? I want to watch all methods in all classes which extend the abstract class com.home.learn.Try</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload