package com.elab.spring.anno;

import com.elab.annotation.Author;
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"}, remark = "abc")
    public void test1() {

    }

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

        System.out.println(mergedAnnotation);

    }

}
