Interface binding xml file

Role: Similar to instantiate an object method call, easy to use

How to do it:

1. Create an interface that matches the mapping file.

    Create an interface in the source file, write the abstract methods in the interface.

 

 

2. mapping file

Namespace must be the same and the name of the interface where the

The same id value required and the method name

 

 3. Test

UserDao.class can become an object

 

Guess you like

Origin www.cnblogs.com/sh-0131/p/11431629.html