欢迎来到天天文库
浏览记录
ID:1970406
大小:43.52 KB
页数:13页
时间:2017-11-14
《struts2+spring3.2+ibatis2.3整合》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、www.shangqian.com.cn编程开发-JavaWeb-框架Struts2+Spring3.2+ibatis2.3整合一、代码目录结构:srccn.itair.actioncn.itair.beancn.itair.daocn.itair.dao.implcn.itair.exceptioncn.itair.ibatiscn.itair.ibatis.sqlmapcn.itair.webcn.itair.web.filtercn.itair.servicecn.itair.service.implconfigspring-action.xmlspring-dao.x
2、mlspring-jdbc.properiesspring-service.xmlspring-transation.xmlsql-map-config.xmlSqlMapCommand.xmlLog4j.propertiesstruts.xml 二、web.xml配置:(集成struts、spring)3、ema-instance"xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">contextConfigLocationclasspath*:config/spring-*.xml4、-class>org.springframework.web.context.ContextLoaderListenerstruts2www.shangqian.com.cnorg.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilterencoding5、utf-8struts2/*SetCharacterEncodingorg.springframework.web.filter.CharacterEncod6、ingFilterencodingUTF-8SetCharacterEncoding/*index.jsp7、welcome-file-list>三、spring配置:(整合ibats,配置数据数据库,事务管理,配置ibatis)--------------------------------------------华丽分隔线---------------------------------------------------spring-jdbc.properties:jdbc.driver=com.mysql.jdbc.Driverjdbc.url=jdbc:mysql://127.0.
3、ema-instance"xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">contextConfigLocationclasspath*:config/spring-*.xml4、-class>org.springframework.web.context.ContextLoaderListenerstruts2www.shangqian.com.cnorg.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilterencoding
4、-class>org.springframework.web.context.ContextLoaderListener
5、utf-8struts2/*SetCharacterEncodingorg.springframework.web.filter.CharacterEncod
6、ingFilterencodingUTF-8SetCharacterEncoding/*index.jsp
7、welcome-file-list>三、spring配置:(整合ibats,配置数据数据库,事务管理,配置ibatis)--------------------------------------------华丽分隔线---------------------------------------------------spring-jdbc.properties:jdbc.driver=com.mysql.jdbc.Driverjdbc.url=jdbc:mysql://127.0.
此文档下载收益归作者所有