which jars are needed for using AspectJ of Spring

2019-05-20 22:44发布

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;
  }
}

5条回答
Bombasti
2楼-- · 2019-05-20 22:59

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

查看更多
老娘就宠你
3楼-- · 2019-05-20 23:05

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楼-- · 2019-05-20 23:08

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

查看更多
可以哭但决不认输i
5楼-- · 2019-05-20 23:12

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.

required to use apsectJ

查看更多
可以哭但决不认输i
6楼-- · 2019-05-20 23:16

this is link to get jars

查看更多
登录 后发表回答