SpringMVC 之 Controller、Service层职责

Controller层

1.接收httpRequest/requestDTO数据 ,检查接收数据参数与格式。

2.传递参数至Service层并接收返回responseDTO数据。

3.包装responseDTO并客户端响应请求。

*** Controller层只做2件事:1获取并校验入参,2由Service层获取处理结果并返回 ***

 

 Service层

1.接收Controller层数据

2.与DAO层交互,处理业务逻辑

3.生成responseDTO数据并返回Controller层 

posted @ 2017-01-17 11:19  马克队长  阅读(4487)  评论(0编辑  收藏  举报