![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java-教程及实例
我是xxxx
苦逼程序员一枚
展开
-
动态代理简单实例
public interface Interface { void doSomething(); void somethingElse(String arg);}public class RealObject implements Interface { public void doSomething() { System.out.println("RealObject.转载 2013-12-19 17:04:35 · 820 阅读 · 0 评论 -
Java内部类与静态内部类
Java内部类与静态内部类 定义在一个类内部的类叫内部类,包含内部类的类称为外部类。内部类可以声明public、protected、private等访问限制,可以声明为abstract的供其他内部类或外部类继承与扩展,或者声明为static、final的,也可以实现特定的接口。外部类按常规的类访问方式使用内部类,唯一的差别是外部类可以访问内部类的所有方法与属性,包括私有方法与属性。(转载 2013-12-10 15:01:26 · 462 阅读 · 0 评论 -
动态代理 简单实例二
public interface SomeMethods { void boring1(); void boring2(); void interesting(String arg); void boring3();}public class Implementation implements SomeMethods { public void boring1() {转载 2013-12-20 01:08:56 · 421 阅读 · 0 评论 -
代理设计模式简单实例
public interface Interface { void doSomething(); void somethingElse(String arg);}public class RealObject implements Interface { public void doSomething() { System.out.println("RealObject.转载 2013-12-19 15:05:44 · 628 阅读 · 0 评论 -
第三节(上):struts.xml 文件结构说明
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd">转载 2014-01-14 18:53:35 · 786 阅读 · 0 评论 -
struts2线程安全
问题:Struts 2 Action对象为每一个请求产生一个实例,因此没有线程安全问题。Spring的Ioc容器管理的bean默认是单实例的,上一次请求处理的状态信息被保持下来,并影响了下一次的请求,实际上就是Action中的类变量被不同的请求读取,出现错误结果解决:就是不用单例, spring中bean的作用域设为prototype,每个请求对应一个实例.1、Struts转载 2014-01-11 20:42:14 · 491 阅读 · 1 评论