摘要: 1. 导入spring-core.jar 2. 接口: 3.目标对象, 不用实现接口 //目标对象 , 邓紫棋实实在在的在唱歌和跳舞 public class Dengziqi { public void sing() { System.out.println("邓紫棋为你唱歌...."); } p 阅读全文
posted @ 2018-01-03 21:21 黑土白云 阅读(277) 评论(0) 推荐(0) 编辑
摘要: 1 动态代理, 2 1)代理对象,不需要实现接口; 3 2)代理对象的生成,是利用JDK API, 动态的在内存中构建代理对象(需要我们指定创建 代理对象/目标对象 实现的接口的类型;); 4 3) 动态代理, JDK代理, 接口代理; 5 6 JDK中生成代理对象的API: 7 |-- Proxy 阅读全文
posted @ 2018-01-02 23:52 黑土白云 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 接口:(跳舞, 还是唱歌?) 1 public interface IUserDao { 2 3 void save(); 4 5 void update(); 6 } 目标对象把活全干完,唱歌跳舞都必须要干 1 // 目标对象 2 public class UserDao implements I 阅读全文
posted @ 2018-01-02 23:40 黑土白云 阅读(119) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2017-12-17 16:56 黑土白云 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2017-12-17 15:53 黑土白云 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2017-12-17 13:45 黑土白云 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 1. server 1 public class Server { 2 3 public static void main(String[] args) throws Exception { 4 System.out.println("Server is starting..."); 5 //1 创 阅读全文
posted @ 2017-12-14 20:52 黑土白云 阅读(1105) 评论(0) 推荐(0) 编辑
摘要: 1. server 先启动 1 public class Server { 2 public static final int port = 8765; 3 4 public static void main(String[] args) { 5 System.out.println("Server 阅读全文
posted @ 2017-12-13 22:45 黑土白云 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 1. 先启动服务端, 后启动客户端 1 public class Server { 2 public static final int port = 8765; 3 4 public static void main(String[] args) { 5 System.out.println("Se 阅读全文
posted @ 2017-12-13 22:25 黑土白云 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 1. 结果: 133169线程0开始下载线程1开始下载线程2开始下载线程_1的下载起点是 44389 下载终点是: 88777线程_0的下载起点是 0 下载终点是: 44388线程_2的下载起点是 88778 下载终点是: 133168线程2下载完毕线程1下载完毕线程0下载完毕 1 package 阅读全文
posted @ 2017-12-12 21:43 黑土白云 阅读(1216) 评论(0) 推荐(0) 编辑