SSM整合
SSM整合 在这之前我们已经学习了如何整合Spring和web项目,若要整合Spring,SpringMVC,Mybatis时,只需要在其基础上加入SpringMVC和MyBatis就可以了; 整合步骤: 1.准备空的web项目 2.在web.xml中配置Spring容器 3.在web.xml中配置SpringMVC核心控制器 4.整合MyBatis与Spring pom依赖: 主要依赖类别:,webmvc(会自动依赖Spring其他核心jar) , web基础的(jstl,jsp,servlet),mybatis ,事务管理, AspectJ <dependencies> <!-- spring + springwebmvc--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>5.2.2.RELEASE</version> </dependency> <!-- mybatis--> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> <version>2.0.3</version> </dependency>