The difference between entity and domain&dao and mapper

entity: The fields in the database and the entity class should be one-to-one corresponding and need to be named the same
domain: represents an object module, the field corresponds to it, the naming can be different

Dao: Need to create an interface but also implement it, there are a lot of redundant statements, there are many other original development defects
mapper: only need to create an interface, using automatic injection; mapping by configuring mapper.xml.

Guess you like

Origin blog.csdn.net/qq_39219307/article/details/106982124