SimpleInterceptorResolutionStrategy.java 文件源码

java
阅读 13 收藏 0 点赞 0 评论 0

项目:fmek 作者:
private List<InterceptorInfo> collectInterceptors(ConfigurableListableBeanFactory configurableListableBeanFactory) {
    List<InterceptorInfo> interceptors = new ArrayList<InterceptorInfo>();
    registeredInterceptorsCache = new ArrayList<InterceptorInfo>();
    String[] bdNames = configurableListableBeanFactory.getBeanDefinitionNames();
    for (String bdName : bdNames) {
        BeanDefinition bd = configurableListableBeanFactory.getBeanDefinition(bdName);
        if (bd instanceof AnnotatedBeanDefinition) {
            AnnotatedBeanDefinition abd = (AnnotatedBeanDefinition) bd;
            if (InterceptorInfo.isInterceptor(abd)) {
                if (bdName.startsWith(SCOPED_TARGET)) {
                    bd = configurableListableBeanFactory.getBeanDefinition(bdName.replace(SCOPED_TARGET, ""));
                }
                InterceptorInfo interceptorInfo = new MethodInterceptorInfo(new BeanDefinitionHolder(bd, bdName.replace(SCOPED_TARGET, "")));
                resolveInterceptorTargets(configurableListableBeanFactory, interceptorInfo);
                interceptors.add(interceptorInfo);
            }
        }
    }
    return interceptors;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号