@ApiOperation("AnnotationUtil使用:注解工具类")
@GetMapping("/annotationUtil")
public CommonResult annotationUtil(){
//获取指定类、方法、字段、构造器上的注解列表
Annotation[] annotations = AnnotationUtil.getAnnotations(HutoolController.class, false);
LOGGER.info("annotationUtil annotations:{} ",annotations[1]);
//获取指定类型的注解
Api api = AnnotationUtil.getAnnotation(HutoolController.class, Api.class);
LOGGER.info("annotationUtil api value:{}",api.description());
//获取指定类型注解的值
Object annotationValue = AnnotationUtil.getAnnotationValue(HutoolController.class, RequestMapping.class);
LOGGER.info("annotationUtil annotationValue:{} ",annotationValue);
return CommonResult.success(null,"操作成功!");
}