阅读背景:

为什么使用服务层而不是弹簧控制器的辅助类?

来源:互联网 

In my experience this is how ive seen spring controllers used : Define a spring controller which returns a value of some type to presentation layer. The controller request mapping method calls a service layer. The service layer itself consists of an interface and implementation. The service interface always contains just one method so its not really polymorphic as it keeps 'one form' consistently. The service implementation may access data of some kind, perhaps from a DAO and returns it the controller. The controller may amend this data slightly before returning its returned to the presentation layer.In my experience this is how ive seen spring co




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: