which jars are needed for using AspectJ of Spring framework?

烂漫一生 提交于 2019-12-22 12:04:46

问题


import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.ProceedingJoinPoint;

@Aspect
public class AroundExample {

  @Around("com.xyz.myapp.SystemArchitecture.businessService()")
  public Object doBasicProfiling(ProceedingJoinPoint pjp) throws Throwable {
    // start stopwatch
    Object retVal = pjp.proceed();
    // stop stopwatch
    return retVal;
  }
}

回答1:


You will need current version of aspectj jars i.e. aspectjrt-1.6.6.jar and aspectjweaver-1.7.2.jar with other jars shown in the below image to work with AspectJ of Spring framework.




回答2:


this is link to get jars




回答3:


The link provided in the accepted answer didn't work for me. So I had to get the jar from somewhere else. This is the LINK

The file is aspectjrt-1.6.6.jar




回答4:


You can use this to find jars http://findjar.com




回答5:


aspectj-N.N.NN.jar, where N is the version number. See the AspectJ download site.



来源:https://stackoverflow.com/questions/6263311/which-jars-are-needed-for-using-aspectj-of-spring-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!