Sring+ibatis+easyui简单配置,包括事务以及缓存配置等

框架搭建01

说明:本文讲述springmvc+ibatis+easyui框架搭建详细说明

1. 搭建步奏

01. 导入jar

Spring-webmvc-3.1.0.RELEASE.jar

Spring-aop-3.1.0.RELEASE.jar

Spring-beans-3.1.0.RELEASE.jar

Spring-context-3.1.0.RELEASE.jar

Spring-context.support-3.1.0.RELEASE.jar

Spring-core-3.1.0.RELEASE.jar

Spring-expression-3.1.0.RELEASE.jar

Spring-web-3.1.0.RELEASE.jar

Spring-asm-3.1.0.RELEASE.jar

Spring-orm-3.1.0.RELEASE.jar

Spring-jdbc-3.1.0.RELEASE.jar

Spring-transacction-3.1.0.RELEASE.jar

 

Commons-logging-1.1.jar--->支持spring日志功能

Log4j-1.2.16.jar--->日志输出

C3p0-0.9.1.jar--->用于数据库连接

db2jcc.jar--->用于连接db2数据库驱动

Ibatis-2.3.4.jar--->ibatis功能jar

Aopalliance-1.0.jar--->缺少此jar包,报org/aopalliance/intercept/MethodInterceptor 异常,此包是spring依赖包,包含AOP联盟的api库,提供接口

 

 


02. 配置web.xml

001. 配置ContextLoaderListener监听

002. 配置Log4jConfigListener监听

003. 配置log4j.properties上下文 context-param

004. 配置applicationContext.xml上下文 context-param

005. 配置DispatcherServlet 初始化spring配置文件springmvc.xml  设置 load-on-startup 启动方式 1tomcat启动后立即加载

006. 配置servlet-mapping 访问路径拦截/访问后缀形式 .do

007. 配置访问首页以及错误信息页 

 

 

03. 配置springmvc.xml

001. 配置注解tx-annotation-driven

002. 配置扫描包路径 context-component-scan,去掉service层扫描,防止重复扫描覆盖

003. 配置properties--->propertyPlaceholderConfigurer类 添加properties文件

004. 配置internalResourceViewResolver 访问页面的前缀和后缀格式

005. 配置拦截器,可添加不需要拦截地址方式name,在拦截类中属性等同于 name,拦截成功之后再进行判断,是否需要处理,以及自定义异常拦截

006. 配置导入ibatis配置文件 import

 

 

04. 配置applicationContext.xml 

001. 扫描全包

002. 配置c3p0配置文件

003. 配置datasource

004. 配置sqlmapclientFactoryBean 添加sqlmapconfig.xml 配置文件和  datasource数据源

005. 配置事务


05. 配置ibatis配置文件 可为空

 

 =================================等待更新====================

 

 

06. 配置properties

001.配置log4j.properties

002. 配置c3p0.properties

 

 

 

07. 配置_SqlMap.xml

 

 

 

08. 建立entity实体类

 

 

 

09. 建立dao/daoimpl  service/serviceImpl  controller

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值