1. package com.atguigu.java2;
    2. import java.lang.annotation.Retention;
    3. import java.lang.annotation.RetentionPolicy;
    4. import java.lang.annotation.Target;
    5. import static java.lang.annotation.ElementType.*;
    6. /**
    7. * @author Dxkstart
    8. * @create 2021-06-07 13:51
    9. */
    10. @Target({TYPE,FIELD,METHOD,PARAMETER,CONSTRUCTOR,LOCAL_VARIABLE})
    11. @Retention(RetentionPolicy.RUNTIME)
    12. public @interface MyAnnotion {
    13. String value() default "hello";
    14. }