欢迎来到天天文库
浏览记录
ID:34725793
大小:119.54 KB
页数:28页
时间:2019-03-10
《springmybatis整合文档》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、MyBatis整合Spring开发环境:System:WindowsWebBrowser:IE6+、Firefox3+JavaEEServer:tomcat5.0.2.8、tomcat6IDE:eclipse、MyEclipse8Database:MySQL11开发依赖库:JavaEE5、Spring3.0.5、Mybatis3.0.4、myBatis-spring-1.0、junit4.8.2Email:hoojo_@126.comBlog:http://blog.csdn.net/IBM_hoojohttp://hoojo.cnblogs.com/1、首先新建一个WebProject
2、命名为MyBatisForSpring,新建项目时,使用JavaEE5的lib库。然后手动添加需要的jar包,所需jar包如下:2、添加spring的监听及springMVC的核心Servlet,web.xml内容,内容如下:org.springframework.web.context.ContextLoaderListenercontex
3、tConfigLocationclasspath*:applicationContext-*.xmldispatcherorg.springframework.web.servlet.DispatcherServletcontextConfigLocati
4、on/WEB-INF/dispatcher.xml1dispatcher*.docharacterEncodingFilter
5、-name>org.springframework.web.filter.CharacterEncodingFilterencodingUTF-8characterEncodingFilter/*6、ng>1、在WEB-INF目录中添加dispatcher.xml,内容如下:7、chema/beanshttp://www.springframework.org/schema/beans/spring-beans-3.0.xsdhttp://www.springframework.org/schema/contexthttp://www.springframework.org/schema/context/spring-context-3.0.xsd">
6、ng>1、在WEB-INF目录中添加dispatcher.xml,内容如下:7、chema/beanshttp://www.springframework.org/schema/beans/spring-beans-3.0.xsdhttp://www.springframework.org/schema/contexthttp://www.springframework.org/schema/context/spring-context-3.0.xsd">
7、chema/beanshttp://www.springframework.org/schema/beans/spring-beans-3.0.xsdhttp://www.springframework.org/schema/contexthttp://www.springframework.org/schema/context/spring-context-3.0.xsd">
此文档下载收益归作者所有