ssm整合思路:
1.搭建maven项目
2.pom.xml中 相关jar坐标
2.1 添加读取mybatis xml文件的插件
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
</resources>
2.2 添加mybatis 自动生成dao和entity插件
<!-- 使用MyBatis Generator逆向工程生成代码-->
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.5</version>
<configuration>
<!--允许移动生成的文件-->
<verbose>true</verbose>
<!--允许覆盖生成的文件-->
<overwrite>true</overwrite>
</configuration>
</plugin>
3.逆向生成 entity及dao,xml (根据项目要求 修改 映射关系(实体类/xml))
4.编写spring的配置文件 applicationContext.xml(整合mybatis)
db.properties log4j.properties
5.springMvc配置文件
6.web.xml中加载 spring及 springmvc的配置文件 并且添加 过滤器
7.发布项目 启动服务器 根据 错误信息 修改相关配置
将文件上传的思路:
还需要一个fastjson包。
页面需要添加二个插件(1)js/jquery-1.8.3.js (2)js/jquery.form.js
<!-- jQuery.form.js是一个form插件,支持ajax表单提交和ajax文件上传 -->