开园这么多年了也没写几篇文章,现在想想光看别人的也不行啊,咱也自己写写,就写这天我我在做spring mvc与mybatis的集成时遇到的问题

1 spring与mybatis的集成

这个相信大家都弄过吧,不过我还是要说说.首先咱们得先把项目大体的架子搭起来,本人用的IDEA,废话不多说来上图

iOS培训,Swift培训,苹果开发培训,移动开发培训

这是我的spring和mybatis的项目的结构,这我相信大家都能看明白,不用我多说什么.其实最主要的还是applicationContext.xml文件

iOS培训,Swift培训,苹果开发培训,移动开发培训

 1 <?xml version="1.0" encoding="UTF-8"?> 2 <beans xmlns="http://www.springframework.org/schema/beans" 3     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" 4     xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop" 5     xsi:schemaLocation="http://www.springframework.org/schema/beans 6         http://www.springframework.org/schema/beans/spring-beans.xsd 7         http://www.springframework.org/schema/aop 8         http://www.springframework.org/schema/aop/spring-ao