package com.elab.spring.anno;

import com.elab.annotation.Author;
import com.elab.core.aop.annotations.ExceptionHandle;
import org.junit.Test;
import org.springframework.core.annotation.AnnotatedElementUtils;

import java.lang.reflect.Method;

/**
 * @Module TODO
 * @Description TODO
 * @Author liukaixiong
 * @Date 2021/1/22 19:44
 */

public class TestAnnotation {

    @MQOperation(nickname = {"liukx", "lkx"}, describe = "abc")
    public void test1() {

    }

    @Test
    public void test() throws Exception {
        Method test1 = TestAnnotation.class.getDeclaredMethod("test1", null);
        ExceptionHandle mergedAnnotation = AnnotatedElementUtils.findMergedAnnotation(test1, ExceptionHandle.class);

        System.out.println(mergedAnnotation);

    }

}
