go4it

just do it

随笔分类 -  Spring

1 2 下一页

Spring视频学习(十七)Spring配置文件总结
摘要:1.基本配置:<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springf... 阅读全文

posted @ 2009-07-24 20:52 cxccbv 阅读(1055) 评论(0) 推荐(0) 编辑

Spring视频学习(十六)集成Struts2
摘要:1.集成Spring和Hiberante<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http:... 阅读全文

posted @ 2009-07-24 20:17 cxccbv 阅读(472) 评论(0) 推荐(0) 编辑

Spring视频学习(十五)集成JPA
摘要:1.所需jar包: 使用Myeclipse时,先添加Spring支持,后添加JPA支持,然后Junit测试,最后添加Struts支持。 2.Spring的xml配置:<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="... 阅读全文

posted @ 2009-07-24 17:02 cxccbv 阅读(622) 评论(0) 推荐(0) 编辑

Spring视频学习(十四)Spring提供的CharacterEncoding和OpenSessionInView功能
摘要:一、解决乱码 1.新建一个添加的ActionForm:import org.apache.struts.action.ActionForm;public class PersonForm extends ActionForm { private Integer id; private String name; public Integer getId() { return id; } publi... 阅读全文

posted @ 2009-07-22 19:53 cxccbv 阅读(492) 评论(0) 推荐(0) 编辑

Spring视频学习(十三)配置Hibernate的二级缓存
摘要:1.在applicationContex.xml文件里面添加二级缓存配置: <!-- 配置hibernate的sessionFactory --><bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="d... 阅读全文

posted @ 2009-07-22 17:12 cxccbv 阅读(422) 评论(0) 推荐(0) 编辑

Spring视频学习(十二)整合Struts1.3
摘要:1.使用myeclipse来对web添加struts1.3的支持 2.在web容器中实例化spring容器 web.xml如下:<?xml version="1.0" encoding="UTF-8"?><web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLS... 阅读全文

posted @ 2009-07-22 15:37 cxccbv 阅读(990) 评论(0) 推荐(0) 编辑

Spring视频学习(十一)整合Hibernate3.2
摘要:1.整合的jar包 Spring2.5+Hibernate3.3+Struts1.3整合开发 hibernate核心安装包下的:hibernate3.jarlib\required\*.jarlib\optional\ehcache-1.2.3.jarhibernate 注解安装包下的lib\test\slf4j-log4j12.jarSpring安装包下的dist\spring.jardist... 阅读全文

posted @ 2009-07-22 10:33 cxccbv 阅读(580) 评论(0) 推荐(0) 编辑

Spring视频学习(十)使用XML配置事务
摘要:1.XML配置<!-- 配置事务管理器 --> <bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource" ref="dataSource"/> </bean> &l... 阅读全文

posted @ 2009-07-21 21:13 cxccbv 阅读(447) 评论(0) 推荐(0) 编辑

Spring视频学习(九)使用Spring注解方式管理事务与传播行为详解
摘要:一、事务传播属性 REQUIRED:业务方法需要在一个事务中运行。如果方法运行时,已经处在一个事务中,那么加入到该事务,否则为自己创建一个新的事务。 NOT_SUPPORTED:声明方法不需要事务。如果方法没有关联到一个事务,容器不会为它开启事务。如果方法在一个事务中被调用,该事务会被挂起,在方法调用结束后,原先的事务便会恢复执行。 REQUIRESNEW:属性表明不管是否存在事务,业务方法总会为... 阅读全文

posted @ 2009-07-21 15:39 cxccbv 阅读(690) 评论(0) 推荐(0) 编辑

Spring视频学习(八)整合JDBC
摘要:1.配置命名空间<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="htt... 阅读全文

posted @ 2009-07-21 15:13 cxccbv 阅读(513) 评论(0) 推荐(0) 编辑

Spring视频学习(七)Spring的AOP
摘要:一、总括 实现AOP的技术,主要分为两大类:一是采用动态代理技术,利用截取消息的方式,对该消息进行装饰,以取代原有对象行为的执行;二是采用静态织入的方式,引入特定的语法创建“方面”,从而使得编译器可以在编译期间织入有关“方面”的代码。然而殊途同归,实现AOP的技术特性却是相同的,分别为: http://wayfarer.cnblogs.com/articles/241024.html 1、join... 阅读全文

posted @ 2009-07-20 20:57 cxccbv 阅读(2648) 评论(0) 推荐(0) 编辑

Spring视频学习(六)JDK和cglib实现AOP
摘要:一、JDK的AOP实现--基于接口的代理模式package cn.itcast.aop;import java.lang.reflect.InvocationHandler;import java.lang.reflect.Method;import java.lang.reflect.Proxy;import cn.itcast.service.impl.PersonServiceBean;pu... 阅读全文

posted @ 2009-07-20 13:43 cxccbv 阅读(335) 评论(0) 推荐(0) 编辑

Spring视频学习(五)组建扫描
摘要:一、组建扫描配置 <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLoc... 阅读全文

posted @ 2009-07-20 13:33 cxccbv 阅读(343) 评论(0) 推荐(0) 编辑

Spring视频学习(四)Spring手工和自动注解
摘要:一、依赖注入的形式: 二、其中的手工装配: 分:XML配置和注解配置。 其中XML配置有:<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-ins... 阅读全文

posted @ 2009-07-20 13:17 cxccbv 阅读(810) 评论(0) 推荐(0) 编辑

Spring视频学习(三)注入bean的属性
摘要:注入基本类型,集合,类属性:<!-- ref方式注入属性 --><bean id="personDao" class="com.persia.PersonDaoBean"></bean><bean id="personService4" class="com.persia.PersonServiceBean"> <property name=... 阅读全文

posted @ 2009-07-20 13:06 cxccbv 阅读(334) 评论(0) 推荐(0) 编辑

Spring视频学习(二)实例化bean的3种方法
摘要:1.实例化bean的三种方法: (1) 构造器<bean id="personService" class="com.persia.PersonServiceBean"> <constructor-arg index="0" value="构造注入的name" ></constructor-arg> <!-- 基本类型可以不写type --> <... 阅读全文

posted @ 2009-07-20 13:02 cxccbv 阅读(655) 评论(0) 推荐(0) 编辑

Spring视频学习(一)依赖注入原理
摘要:1. 控制反转 依赖对象的创建和维护由应用本身转移到外部容器,即控制权也转移到外部容器中。 2. 依赖注入 依赖对象有外部容器在运行期间动态注入到组件中。 3.所需要的jar包: 4.核心版的spring (1)spring配置文件放在类路径src下 模板:<?xml version="1.0" encoding="UTF-8"?><beansxmlns="http://www.... 阅读全文

posted @ 2009-07-20 10:36 cxccbv 阅读(568) 评论(0) 推荐(0) 编辑

Spring JPetStore学习(二)业务层
摘要:applicationContext如下:<?xml version="1.0" encoding="UTF-8"?><!-- - Application context definition for JPetStore's business layer. - Contains bean references to the transaction manager and to... 阅读全文

posted @ 2009-07-17 15:37 cxccbv 阅读(1264) 评论(0) 推荐(0) 编辑

Spring JPetStore学习(三)事务
摘要:spring配置文件application.xml中的事务总结 http://fluagen.blog.51cto.com/146595/148777 spring配置文件中几种配置事务的方式: 第一种:通过aop管理用户的增删改 (aspectJ) <aop:config> <aop:advisor pointcut="execution(* *..OrderDao.*(.... 阅读全文

posted @ 2009-07-17 14:32 cxccbv 阅读(1213) 评论(0) 推荐(0) 编辑

Spring JPetStore学习(一)配置JPetStore
摘要:http://quqtalk.javaeye.com/blog/362163 一、在Tomcat中部署Spring jpetstore Spring samples中的jpetstore,基于iBATIS的jpetstore,数据库层使用iBATIS。在web层,提供了两种MVC可以选择,即Spring的MVC和Struts的MVC(1.1)。 测试环境: JDK版本:1.5.0_12-b04... 阅读全文

posted @ 2009-07-17 11:31 cxccbv 阅读(7072) 评论(0) 推荐(0) 编辑

1 2 下一页

导航