0

demand:Decryption of database query results with AOP MybatisPlus Return results,for example:List

I customize an annotation to intercept annotated methods, But I intercepted the method and got that the return type is List,How can I get the VO type in the list

@Component
@Aspect
@Order
public class DecryptrResultAspect {

    @Pointcut("@annotation(com.sgcc.hr.recruit.graduate.common.utils.NeedDncryptResult)")
    public void rsaDecodeSecurityParameterAspect() {
    }


    @After("rsaDecodeSecurityParameterAspect()")
    public void decode(JoinPoint joinPoint) {
        try {
            MethodSignature signature = (MethodSignature) joinPoint.getSignature();
            Class returnType = signature.getReturnType();
            System.out.println(returnType);
            // output interface java.util.List

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
lzh_86
  • 1
  • I need to get the VO type, get the annotation on the field, and then call the decryption method on the field – lzh_86 Dec 08 '21 at 09:02
  • Please share the method that is advised ( the one annotated with `NeedDncryptResult`) , list item type, details on VO type , the annotation on which field and call what method ? Provide as much details to help others to help you . – R.G Dec 09 '21 at 14:55

0 Answers0