MyBatis role in the namespace (namespace) of

MyBatis role in the namespace (namespace) of

Send this article is to explain the role MyBatis namespace (namespace), it may be some small partners is less clear.
In large projects, there may be a large number of SQL statements, this time from a unique identification (ID) for each SQL statement becomes not easy. To solve this problem, in MyBatis, you can play a unique namespace for each mapping file, so that each SQL statement is defined in the map file has become the definition of an ID in this namespace. As long as we can ensure that every namespace this ID is unique, even in the same statement ID different mapping file, it will not produce a conflict.

Published 10 original articles · won praise 4 · views 10000 +

Guess you like

Origin blog.csdn.net/weixin_42528204/article/details/105050480