Features of Spring Web MVC

21.1.1 Features of Spring Web MVC

Spring Web Flow

Spring Web Flow (SWF) aims to be the best solution for the management of web application page flow.

SWF integrates with existing frameworks like Spring MVC and JSF, in both Servlet and Portlet environments. If you have a business process (or processes) that would benefit from a conversational model as opposed to a purely request model, then SWF may be the solution.

SWF allows you to capture logical page flows as self-contained modules that are reusable in different situations, and as such is ideal for building web application modules that guide the user through controlled navigations that drive business processes.

For more information about SWF, consult the Spring Web Flow website.

Spring’s web module includes many unique web support features:

  • Clear separation of roles. Each role — controller, validator, command object, form object, model object, DispatcherServlet, handler mapping, view resolver, and so on — can be fulfilled by a specialized object.
  • Powerful and straightforward configuration of both framework and application classes as JavaBeans. This configuration capability includes easy referencing across contexts, such as from web controllers to business objects and validators.
  • Adaptability, non-intrusiveness, and flexibility. Define any controller method signature you need, possibly using one of the parameter annotations (such as @RequestParam, @RequestHeader, @PathVariable, and more) for a given scenario.
  • Reusable business code, no need for duplication. Use existing business objects as command or form objects instead of mirroring them to extend a particular framework base class.
  • Customizable binding and validation. Type mismatches as application-level validation errors that keep the offending value, localized date and number binding, and so on instead of String-only form objects with manual parsing and conversion to business objects.
  • Customizable handler mapping and view resolution. Handler mapping and view resolution strategies range from simple URL-based configuration, to sophisticated, purpose-built resolution strategies. Spring is more flexible than web MVC frameworks that mandate a particular technique.
  • Flexible model transfer. Model transfer with a name/value Map supports easy integration with any view technology.
  • Customizable locale, time zone and theme resolution, support for JSPs with or without Spring tag library, support for JSTL, support for Velocity without the need for extra bridges, and so on.
  • A simple yet powerful JSP tag library known as the Spring tag library that provides support for features such as data binding and themes. The custom tags allow for maximum flexibility in terms of markup code. For information on the tag library descriptor, see the appendix entitled Chapter 40, spring.tld
  • A JSP form tag library, introduced in Spring 2.0, that makes writing forms in JSP pages much easier. For information on the tag library descriptor, see the appendix entitled Chapter 41, spring-form.tld
  • Beans whose lifecycle is scoped to the current HTTP request or HTTP Session. This is not a specific feature of Spring MVC itself, but rather of theWebApplicationContext container(s) that Spring MVC uses. These bean scopes are described in Section 6.5.4, “Request, session, and global session scopes”

http://docs.spring.io/spring/docs/4.2.0.RC1/spring-framework-reference/htmlsingle/#mvc-features

时间: 2025-01-10 14:25:47

Features of Spring Web MVC的相关文章

(Spring文档翻译)Part V, the Web 17.1 Spring Web MVC framework介绍

指南文档的这个部分涵盖了Spring框架对表现层(特别是基于Web的表现层)以及WebSocket消息风格的web应用的支持. Spring框架拥有自己的web框架,Spring Web MVC,包含在前面几个章节.之后的几章是关于Spring框架对其他web技术的集成支持,像JSF等. 再之后是Spring框架的MVC porlet 框架. Spring 的MVC框架围绕着DispatcherServlet设计,DispatcherServlet将请求转发给handler,用可配置的handl

Spring Framework------>version4.3.5.RELAESE----->Reference Documentation学习心得----->Spring Framework中的spring web MVC模块

spring framework中的spring web MVC模块 1.概述 spring web mvc是spring框架中的一个模块 spring web mvc实现了web的MVC架构模式,可以被用于开发web网站 spring web mvc 实现web网站的原理,如下图: 2.使用spring web mvc开发web应用的步骤 step1:在自己的工程中引入spring web mvc模块 step2:配置spring web mvc模块 中的DispatcherServlet,告

Spring Web MVC框架(八) 配置Spring Web MVC

这一篇文章对应于Spring参考文档 Configuring Spring MVC,讲的是Spring Web MVC各部分的配置方法,包括Java代码配置和XML文件配置以及MVC命名空间的使用方法. 启用MVC Java配置和XML命名空间 默认配置 要启用MVC Java配置(@Controller等各种注解)和XML命名空间,如果使用的是Java配置,在配置类上再添加@EnableWebMvc注解即可. @Configuration @EnableWebMvc public class

1.Spring Web MVC有什么

Spring Web MVC使用了MVC架构模式的思想,将web层进行职责解耦. 同样也是基于请求驱动的,也就是使用请求-响应模型.它主要包含如下组件: DispatcherServlet :前端控制器 Handler Mapping :将请求映射到处理器 HandlerAdapter :把处理器包装为适配器,用来支持多种类型的处理器 View Resolver :视图解析器 Controller接口 :页面控制器/动作/处理器 LocalResolver:本地化解析,因为Spring支持国际化

Spring官方文档翻译——15.1 介绍Spring Web MVC框架

Part V. The Web 文档的这一部分介绍了Spring框架对展现层的支持(尤其是基于web的展现层) Spring拥有自己的web框架--Spring Web MVC,在前两章中会有介绍.剩下的章节则用来介绍Spring和其他web技术的集成,比如Struts和JSF(这里只提两个). 本节以对Spring MVC portlet框架的介绍结尾. 第十五章--Web MVC框架(Web MVC framework) 第十六章--视图技术(View technologie) 第十七章--

Spring Web MVC基础

1.MVC模式简介 M-Model模型 模型(Model)的职责是负责业务逻辑.包含两层:业务数据和业务处理逻辑.比如实体类.DAO.Service都属于模型层. V-View视图 视图(View)的职责是负责显示界面和用户交互(手机用户信息).属于视图的组件是不包含业务逻辑和控制逻辑的JSP C-Controller 控制器 控制器是模型层M和视图层V之间的桥梁,用于控制流程比如: 在Servlet项目中的单一控制器ActionServlet. 2.什么是Spring Web MVC Spri

4.Spring Web MVC处理请求的流程

具体执行步骤如下: 1.首先用户发送请求——>前端控制器,前端控制器根据请求信息(如URL)来决定选择哪一个页面控制器进行处理并把请求委托给它, 即以前的控制器的控制逻辑部分:图中的1.2步骤: 2.页面控制器接收到请求后,进行功能处理,首先需要收集和绑定请求参数到一个对象,这个对象在Spring Web MVC中叫命令对象,并进行验证,然后将命令对象 委托给业务对象进行处理:处理完毕后返回一个ModelAndView(模型数据和逻辑视图名):图中的3.4.5步骤: 3.前端控制器收回控制权,然

Spring Web MVC 基础

一.Spring Web MVC简介 1.1.MVC模式简介 *M-Model模型 模型(Model)的职责是负责业务逻辑.包含两层:业务数据和业务处理逻辑.比如实体类.DAO.Service都属于模型层. *V-View视图 视图(View)的职责是负责显示界面和用户交互(收集用户信息).属于视图的组件是不包含业务逻辑和控制逻辑的JSP. *C-Controller控制器 控制器是模型层M和视图层V之间的桥梁,用于控制流程比如:在Servlet项目中的单一控制器ActionServlet. 1

初试 spring web mvc

作为一名code需要了解更多的知识,编程方面的东西太多了,是个逐渐积累的过程.最近学习一下spring web mvc,写下我个人的一些经验. 1.准备jar包.spring mvc 已经到了版本4,网上的很多资料已经不在适用.给出的下载地址也无法适用.这是非常痛苦的.我费了好大功夫才获得这些JAR包. 在官方介绍文档里获得http://docs.spring.io/spring/docs/4.1.0.BUILD-SNAPSHOT/spring-framework-reference/htmls