In java layer entity, dao layer, service layer, mapper layer, util layer, controller layer, and the performance of specific meaning

layer entity

A: entity attribute class is typically defined inside the model layer, corresponding to the M MVC layer, part of the data model layer

B: the entity class corresponds generally have a data table in which the attribute definition field data table, the number of fields in the entity class> = the number of fields in a database table need to operate

dao layer

A: dao layer called a data access layer, called the data access object, belonging to have a more underlying operation, particularly on a table to obtain CRUD, in other words, it must be a dao and a database correspondence tables, and wherein the package is only available method CRUD

service layer

A: service layer is the business logic, can be understood as one or more encapsulation dao proceeded again, mainly for the operation of the specific problems, some operational data layers are combined, indirectly dealing with the database (database operations to provide Methods). To do this layer, then design the interface first, then implement the class.

controller layer

A: responsible for forwarding the request, the page is received over the parameters passed to the processing service, received return value and pass page again

mapper layer

A: Data storage object, corresponding to DAO layer, dealing directly with the database layer Mapper (execute SQL statements), interface to the service layer.

Guess you like

Origin www.cnblogs.com/liangxing1120/p/12156362.html