@Aspect
@Component
public class ReturnJsonAspect {
@Pointcut("execution(* com.mysql.*.*.controller..*.*(..)) && @annotation(com.mysoft.common.annotation.ReturnJsonAnnotation)")
public void controllerAspect() {
System.out.println(22);
}
@Before("controllerAspect()")
public void testBefore(JoinPoint point) {
try {
Map<String, String> map = getMethodDescription(point);
ReturnContextHolder.set(map.get("value"));
ReturnContextHolder.setFunctionName(map.get("functionName"));
} catch (Exception e) {
}
}
@After("controllerAspect()")
public void testAfter(JoinPoint point) {
}