将服务定义同业务逻辑(控制器)以及数据(实体)访问分离,可确保实体中不会透露任何业务逻辑。
Decoupling the service definition from the business logic (controller) and from access to the data (entity) ensures that no business logic manifests itself in the entities.
在此基础上,Spring2.5又加入了两个新的注解 —— @Service和@Controller 来完成为通常的三层架构(数据访问对象、服务、web控制器)角色委任。
Spring 2.5 adds two new annotations - @Service and @Controller - to complete the role designations for a common three-tier architecture (data access objects, services, and web controllers).
控制器将访问其他服务或通过其创建、读取、更新和删除 (CRUD) 操作访问后端实体,从而实现服务业务逻辑。
The controller implements the service business logic by accessing other services or accessing backend entities via their create, read, update and delete (CRUD) operations
应用推荐