001. We create a new Module, which is equivalent to a project of a project
002. Select Blank JAVA program
003. Enter the name of the project is mybatis001
004. We added Support for this project, various framework relies
005. Select maven
According 006. As illustrated, the refresh add the appropriate dependencies
007. Creating an xml file in the following resources directory
008. file contents shown in FIG.
009. com.tianpan.mybatis001 create a package in the java directory
010. Create an App class in the package below
011. create a domain package
012. We create a User class in the package of the following domain
013.User class code shown in FIG.
014. UserMapper we create a profile
015. profile shown in FIG.
016. App class code is as follows, we compile and run it, you can see the log normal, and are inserted into a database data. very perfect.
Beginning of the heart do not forget, if you think this article valuable, authors agree to pay, micro-channel two-dimensional code can be any amount of a reward to the author (Micro Signal: 382 477 247) Oh, thank you.