一、使用的jar包就不详细讲解了,下载了Mybatis 和 Spring 的jar包基本上都添加上去了、
一图概括:(这是我使用的ar包,有些不是Mybatis 和 Spring 的 )
二、 web.[html] view plaincopy
三、 <!-- 配置Spring核心控制器 --> <servlet> <servlet-name>web</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <!-- 不指定 <init-param> 会自动找web. <!-- <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/dispatcher. </init-param> --> <load-on-startup>1</load-on-startup> </servlet> 这个我使用的是默认的 web-servlet.[html] view plaincopy
四: applicationContext.[html] view plaincopy
包含的其他4个
4.1 : aC-common.[html] view plaincopy
4.2 aC-interceptor.
这里**只是拦截到controller , 具体拦截到action',后面会有写到, 这里的配置只是参考。
4.3 aC-properties.
这个[java] view plaincopy
4aC-quartz-cofig.[html] view plaincopy
五:注解方式
下面deleteDynamic方法的 调用地址为: localhost:8080/xx工程名/dynamic/admin.do?action=deleteDynamic
整理的有点乱,【源码地址获取】,希望可以帮助到大家
原标题:Spring SpringMvc + MyBatis 整合
关键词:Spring