zoukankan      html  css  js  c++  java
  • no-proxy 和proxy 的区别

    Child   <-   many-to-one   ->Parent   
        
      class   Child   {   
          private   Parent   parent;   
        
          public   Parent   getParent   (){   
              return   this.parent;//访问了实例变量   
          }   
            
      }   
        
      class   Parent   {   
          private   String   name;   
        
          public   String   getName(){   
              return   this.name;//访问了实例变量   
          }   
        
          public   void   f(){   
              System.out.println("invokeing   f()");//没有访问实例变量   
          }   
      }   
        
      如果   many-to-one   的lazy设为proxy,当child.getParent().getName()或child.getParent().f()时,parent都会被抓取,若设为no-proxy,调用child.getParent().f()时,parent是不会被抓取的,同时这种方式需要编译时字节码增强,否则和proxy没区别。

  • 相关阅读:
    凹透镜
    三角形动点和将军饮马
    数学
    壮壮学习准则
    均值不等式,求极值
    2020年自贡中考数学真题,用的是花钱买的"几何画板",wechat:QZCS12
    90年高考题
    裂项:2005年初中数学竞赛题p32,4
    02-需求来源
    01-产品需求的内涵
  • 原文地址:https://www.cnblogs.com/6zhi/p/5842972.html
Copyright © 2011-2022 走看看