05 2014 档案

摘要:@Component:标注一个普通的Spring Bean类。@Controller:标注控制器组件类。@Service:标注业务逻辑组件类。@Repository:标注DAO组件类。@Scope:指定Bean的作用域。@Resource:配置依赖。@PostConstruct和@PreDestro... 阅读全文
posted @ 2014-05-15 15:18 harryV
摘要:singleton:单体模式,在整个Spring IoC容器中只有一个实例。prototype:原型模式,每次通过容器的getBean获取的bean都会产生一个新的实例。request:对于每次HTTP的请求,使用request定义的bean都会产生一个新的实例。session:对于每次HTTP S... 阅读全文
posted @ 2014-05-15 10:06 harryV
摘要:1:设值注入 spring容器使用属性的setter方法来注入被依赖的实例(使用最多) Person接口package com.lee.bean;public interface Person { public void eat();} Fruit接口package com.lee.be... 阅读全文
posted @ 2014-05-14 16:25 harryV
摘要:1:struts2-spring-pluginSpring整合Struts2所必须的jar包2:org.springframework.expression.PropertyAccessor缺少org.springframework.expression jar包3:web工程导入jar包不能用 b... 阅读全文
posted @ 2014-05-14 11:04 harryV
摘要:/** * Created with IntelliJ IDEA. * User: li_zhe * Date: 14/05/06 * Time: 12:34 * To change this template use File | Settings | File Templates. */pack... 阅读全文
posted @ 2014-05-13 11:15 harryV
摘要:使用stream类型的result实现ajaxpackage com.lee.action;import java.io.ByteArrayInputStream;import java.io.InputStream;import com.opensymphony.xwork2.ActionSupp... 阅读全文
posted @ 2014-05-04 09:35 harryV