一、为什么需要自定义注解
Spring或者Dropwized框架提供了很多内部定义好的注解,可以实现各种各样的功能,但框架提供的注解,并不能满足我们所有的业务场景,有些场景需要我们根据业务自定义更方便业务的注解。
二、什么自定义注解
package com.fuping.liuqu.demo.annotation;
import java.lang.annotation.*;
@Documented
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Inherited
public @interface NafNeed {
}