• 注解工具类


    InterceptorUtils工具类:

    public class InterceptorUtils {
    
        private static Logger logger = getLogger(InterceptorUtils.class);
    
        private InterceptorUtils() {
        }
    
        public static <A extends Annotation> A getAnnotation(Object handler, Class<A> annotationClass) {
            if (!(handler instanceof HandlerMethod)) {
                return null;
            }
    
            HandlerMethod handlerMethod = (HandlerMethod) handler;
            A result;
            if ((result = AnnotationUtils.findAnnotation(handlerMethod.getMethod(), annotationClass)) != null) {
                logger.trace("found [{}] annotation in method-level:{}",
                        annotationClass.getSimpleName(), handlerMethod.getMethod());
            } else {
                if ((result = AnnotationUtils.findAnnotation(handlerMethod.getBeanType(), annotationClass)) != null) {
                    logger.trace("found [{}] annotation in type-level:{}",
                            annotationClass.getSimpleName(), handlerMethod.getBeanType());
                }
            }
            return result;
        }
    
    }
  • 相关阅读:
    CSS——半透明
    CSS——dispaly、overflow、visibility、opacity
    html——特例
    CSS——◇demo
    html——ico
    JS——函数
    JS——数组
    JS——for
    JS——i++与++i
    JS——三元表达式
  • 原文地址:https://www.cnblogs.com/koushr/p/11908131.html
Copyright © 2020-2023  润新知