springmvc的特性

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 soon — can be fulfilled by a specialized object.
  • Powerful and straightforward configuration of both framework and application classesas JavaBeans. This configuration capability includes easy referencing acrosscontexts, such as from web controllers to business objects and validators.
  • Adaptability, non-intrusiveness, and flexibility. Define any controller methodsignature 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 objectsas command or form objects instead of mirroring them to extend a particular frameworkbase class.
  • Customizable binding and validation. Type mismatches as application-levelvalidation 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 tobusiness objects.
  • Customizable handler mapping and view resolution. Handler mapping and viewresolution strategies range from simple URL-based configuration, to sophisticated,purpose-built resolution strategies. Spring is more flexible than web MVC frameworksthat mandate a particular technique.
  • Flexible model transfer. Model transfer with a name/valueMap supports easyintegration with any view technology.
  • Customizable locale, time zone and theme resolution, support for JSPs with or withoutSpring tag library, support for JSTL, support for Velocity without the need for extrabridges, and so on.
  • A simple yet powerful JSP tag library known as the Spring tag library that providessupport for features such as data binding and themes. The custom tags allow formaximum flexibility in terms of markup code. For information on the tag librarydescriptor, see the appendix entitled Chapter 36, spring.tld
  • A JSP form tag library, introduced in Spring 2.0, that makes writing forms in JSPpages much easier. For information on the tag library descriptor, see the appendixentitledChapter 37,spring-form.tld
  • Beans whose lifecycle is scoped to the current HTTP request or HTTPSession.This is not a specific feature of Spring MVC itself, but rather of theWebApplicationContext container(s) that Spring MVC uses. These bean scopes aredescribed inSection 5.5.4, “Request, session, and global session scopes”
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值