Spring Bean作用域介绍: singleton:SpringIoc容器只会创建该Bean的唯一实例,所有的请求和引用都只使用这个实例 Property: 每次请求都创建一个实例 request: 在一次Http请求中,容器会返回该Bean的同一个实例,而对于不同的用户请求,会返回不同的实例。需要注意的是,该作用域仅在基于Web的Spring ApplicationContext情形下有效,以下的session和global Session也是如此 session:同上,唯一的区别是请求的作用域变为了session global session:全局的HttpSession中, ...
这段时间得把所有的基础复习下,特别是重点看下Spring和GWT,早就想在javaeye写点我的学习笔记了,,以后会经常把所学的贴上去,欢迎大家给我提意见和建议!
2008-04-29

使用构造方法创建Bean实例

关键字: spring
1,create a Message Interface: package com.huyong.beans; public interface Message { public String showMessage(); } 2,create another Person Interface: package com.huyong.beans; public interface Person { public void useMessage(); } 3,implement the Message's interface and the Person's interf ...