開課吧javeEE企業(yè)級(jí)開發(fā)工程師008期
2022-12-21 22:36 作者:bili_1559000721 | 我要投稿
blic Object postProcessBeforeInstantiation(Class<?> beanClass, String beanName) {
? ? ? ?Object cacheKey = getCacheKey(beanClass, beanName);
? ? ? ?if (!StringUtils.hasLength(beanName) || !this.targetSourcedBeans.contains(beanName)) {
? ? ? ? ? ?//判斷當(dāng)前BeanName對(duì)應(yīng)的Bean是否應(yīng)該被代理
? ? ? ? ? ?//并將判斷結(jié)果保存下來,避免后續(xù)的后處理方法重復(fù)計(jì)算
? ? ? ? ? ?//在第一次判斷時(shí),會(huì)在shouldSkip里掃描所有Bean進(jìn)行切面初始化
? ? ? ? ? ?if (isInfrastructureClass(beanClass) || shouldSkip(beanClass, beanName)) {
? ? ? ? ? ? ? ?this.advisedBeans.put(cacheKey, Boolean.FALSE);
? ? ? ? ? ? ? ?return null;
標(biāo)簽: