Mybatis simple entry 01

MyBatis is an excellent persistence framework that supports custom SQL, stored procedures and advanced mappings. MyBatis avoids almost all JDBC code and manual setting parameters and obtaining the result set. MyBatis can use simple XML or annotation to configure and map the native information, interfaces and Java POJOs (Plain Ordinary Java Object, ordinary Java Objects) to database records in.

Simple entry case

1. Create a maven project

2. introduced in pom.xml dependent coordinate jar package

3. Preparation of entity class

4. Preparation of persistence layer interface

5. Preparation mapping file interface persistence layer

6. The write Mybatis master configuration file

7. write test classes

Guess you like

Origin www.cnblogs.com/YoungLiu/p/12324140.html