一:了解Springmvc框架
二:springmvc入门
2.1导入springmvn的依赖
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>5.2.5.RELEASE</version>
</dependency>
2.2:配置核心的web.xml文件
2.3:配置applicationContext_mvc.xml文件
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.0.xsd">
<context:component-scan
base-package="org.springframework.samples.petclinic.web" />
<!-- ... -->
<bean id="/hello.do" class="com.chinasoft.controller._01_hello.HelloController"></bean>
</beans>
2.4:springmvc的入门程序
三:springmvc的controller的三种实现方式
3.1:创建一个类实现controller接口
3.2:创建一个类实现 HttpRequestHandler接口
3.3:注解的方式
四:springmvc的三种urlpattern配置
五:springmvc的json处理
5.1:导入依赖
5.2:代码实现
5.2.1:没有时间匹配的json处理
5.2.2:有时间类型的json处理
5.3:处理ie浏览器中文乱码问题
六:springmvc的接收参数的三种方式
6.1:第一种方式(参数对应)
6.2:第二种方式(对象接收)
6.3:第三种方式(RestFul)
七:springmvc的接收参数的乱码问题
7.1:get请求乱码
7.2:post请求中文乱码
八:springmvc的两种jsp转发
九:springmvc的五种绑定参数传递
9.1:使用model的方式绑定
9.2:使用modelAndView绑定
9.3:使用HttpServletRequest request 绑定
9.4:内部转发
9.5:使用map绑定
十:springmvc的重定向和转发问题
十一:springmvc的视图解析器
十二:springmvc的文件的上传和下载
12.1文件的上传
①导入依赖
②:webHTML表单上传
③:配置上传解析器
④:核心代码
12.2文件的下载
十三:springmvc的拦截器
13.1自定义拦截器
13.2 配置拦截器解析