Stage 3 1.Mybatis_03 custom Mybatis framework _5 self-defined coding of Mybatis -.. Create a relationship between the two default implementation class analysis and class

The package name completion XMLConfigBuilder full

so that we can call a method inside loadConfiguration

Create a factory implementation class


SqlSessionFactory the interface

implemented method of an interface inside


the cfg SqlSessionFactory passed as a parameter to the implementation class

in the implementation class which provides a Configration object passed in by the constructor.

Configuration information which contains the link to the database, and execute SQL statements

Create a class that implements SqlSession








Factory implementation class to which the transmitted cfg inside SqlSession implementation class.

to sum up

Resources read out of the stream to the SqlSessionFactoryBuilder the builders.

Builder for us to build a factory object.

Inside the factory object provides us with a method Session

next step is a method in which this session, to achieve the creation of proxy objects. And query all operations.

Guess you like

Origin www.cnblogs.com/wangjunwei/p/11300122.html