1.对象属性自动封装
前台input 用对象的属性名,后台自动会封装为对象,类似struts
2.解决post乱码问题
在web.xml中配置过滤器
<filter>
<filter-name>characterEncodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>utf-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>characterEncodingFilter</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>
3.内部重定向
return "redirect:/list.do";(不能传递数据,地址会变)
4.转发
return "forward:/list.do"; (可以传递数据,地址不会变)