My House

What do you think is the most profitable industry?

馋奶兔 提交于 2020-08-18 12:53:39
What industry is the most profitable and profitable? There are only two industries that I know, both of which I learned after personal experience. The first one is the pharmaceutical industry, which I heard from my elder brother, who is a medical representative. I like to come to my house when I’m okay. If I come to play often, I can’t avoid having two drinks. Once I had two glasses of wine, which is probably too high. Suddenly said to me; Do you know how many times a box of medicines will be processed from the pharmaceutical factory, to the distributor, to the pharmacy, and finally to the

Java面试基础篇——第十五篇:代理模式

*爱你&永不变心* 提交于 2019-11-29 12:46:00
##什么是代理? 通过代理控制对象的访问,可以详细访问某个对象的方法,在这个方法调用处理,或调用后处理。 ##代理应用场景 安全代理 可以屏蔽真实角色 远程代理 远程调用代理类RMI 延迟加载 先加载轻量级代理类,真正需要在加载真实 ##代理的分类 静态代理(静态定义代理类) 动态代理(动态生成代理类) 如 Jdk自带动态代理, Cglib, javaassist(字节码操作库) 接下来举个Sam卖房子的例子来看看三种代理模式: 静态代理,jdk自带动态代理,cglib动态代理。项目构建基于springboot。 ##静态代理 卖房接口类 public interface House { //卖房 void sale(); } Sam类实现卖房接口 public class Sam implements House { @Override public void sale() { System.out.println("I'm Sam, I want sale my house !"); } } 静态代理类,帮Sam卖房。 public class Proxy implements House { private Sam sam; public Proxy(Sam sam){ this.sam = sam; } @Override public void sale() {