上一页 1 2 3 4 5 6 7 8 ··· 49 下一页
摘要: 概述: 代理模式:为另一个对象提供一个替身(或占位符),以控制对该对象的访问; 使用代理模式创建代理对象,让代理对象控制某对象的访问,被代理的对象可以是远程(或创建开销大、需要安全控制的)对象。 要点: 代理角色内部含有对真实角色的引用:从而可以在任何时候操作真实角色对象; 代理角色与真实角色实现同 阅读全文
posted @ 2017-12-16 16:59 wonkju 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 一、单例模式 1,懒汉式 1 package org1; 2 3 public class Singleton { 4 private static Singleton instance = null; 5 6 private Singleton() {} 7 8 public static Sin 阅读全文
posted @ 2017-12-16 14:41 wonkju 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 一、先演示 “简单工厂”: 1 package org; 2 3 interface Fruit { 4 public void eat(); 5 } 6 7 class Apple implements Fruit { 8 public void eat() { 9 System.out.prin 阅读全文
posted @ 2017-12-16 12:09 wonkju 阅读(4674) 评论(0) 推荐(0) 编辑
摘要: 在 myeclipse中,使用 jdk6和7,并使用 spring-framework-5.0.2.RELEASE 时,编写代码: 总会报错: The type org.springframework.context.support.AbstractApplicationContext cannot 阅读全文
posted @ 2017-12-14 10:57 wonkju 阅读(4661) 评论(0) 推荐(2) 编辑
摘要: 问题: apache-tomcat-7.0.8\bin\tcnative-1.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform 解决:jdk不是 64位,需要安装64位的jdk,并在 myeclipse中重新指定。 阅读全文
posted @ 2017-12-13 22:27 wonkju 阅读(886) 评论(0) 推荐(0) 编辑
摘要: 将 apache-tomcat-7.0.8\lib 下的 tomcat-util.jar添加到 注:不是 直接在 configure build path 中添加 jar 阅读全文
posted @ 2017-12-13 22:24 wonkju 阅读(379) 评论(0) 推荐(0) 编辑
摘要: 尝试将 myeclipse中的编译版本修改(如,将1.5修改为1.6) 阅读全文
posted @ 2017-12-13 22:22 wonkju 阅读(356) 评论(0) 推荐(0) 编辑
摘要: 在 myeclipse中,连接 sql server 用的 url connection 与 java 代码 连接的 url值完全相同。 (一下为 java的jdbc连接 sql server 成功的代码片段) 阅读全文
posted @ 2017-12-13 22:20 wonkju 阅读(3204) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2015-12-25 22:18 wonkju 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 对可变性的封装原则(Principle of Encapsulation of Variation)考虑你的设计什么可能会发生变化。这与通常将焦点放到 ”什么会导致设计改变“ 的思想方式正好相反。这一思路考虑的不是 什么会导致设计改变, 而是考虑你允许什么发生改变而不让这一改变导致重新设计。找到一个... 阅读全文
posted @ 2015-12-13 16:52 wonkju 阅读(178) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 49 下一页