✎
13.2.1 绑定默认数据类型
当前端请求的参数比较简单时,可以在后台方法的形参中直接使用
Spring MVC 提供的默认参数类型进行数据绑定。
常用默认参数类型
HttpServletRequest :通过 request 对象获取请求信息;
HttpServletResponse :通过 response 处理响应信息;
HttpSession :通过 session 对象得到 session 中存放的对象;
Model/ModelMap : Model 是一个接口, ModelMap 是一个
接口实现,作用是将 model 数据填充到 request 域。
评论0
最新资源