spring web framework

转载自 《architectural-patterns》

Spring framework 实现了一种 Front controller 设计模式,现在 translate these in Chinese.

 The Dispatcher Servlet component is the single servlet that functions as the front controller and handles all incoming requests. The Dispatcher Servlet then calls Handler Mapping in order to find an object that could service the request.

Dispatcher Servlet 组件是一个servlet 可以处理所有的请求并且调用 Handler Mapping 来找到一个可以处理请求的controller.

The request is then given to the controller object so that the Dispatcher becomes free to perform functions associated with the fulfilment of business logic as per the user's request.

 

The controller object returns an encapsulated object that contains the model object and view object. This is represented by the ModelandView class.

Controller 对象返回一个封装了model 和view object 的modelandview 对象

If the ModelandView contains the logical name of the view, the Dispatcher Servlet calls the View Resolver to get details of the actual view object from its logical name. The Dispatcher Servlet then gives the model object to the view object so that it can be displayed to the end user.

在modelandview 对象包含了view的逻辑 名称。Dispacher servlet 调用 view resolver 得到真实的view 对象,然后传递给view object 展示给最终用户。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值