I have combed the workflow and key source code of MyBatis when it is used alone. Now let's see how MyBatis works when it is integrated with Spring
Start with use
Spring integrates MyBatis
1. Introduce dependency. In addition to the dependency of MyBatis, you need to introduce the dependency of MyB ...
Posted by juschillin on Sat, 22 Feb 2020 20:43:01 -0800
1. Automatic assembly
When Spring assembles Bean properties, it is sometimes quite clear that a reference to a Bean needs to be assembled to the specified properties.For example, if there is only one Bean of type org.mybatis.spring.SqlSessionFactoryBean in our application context, then any ...
Posted by 990805 on Sat, 22 Feb 2020 16:17:00 -0800
As mentioned in the previous article How MyBatis builds configuration classes Yes, I also said that MyBatis is mainly divided into two phases in the running process, the first is building, the second is executing, so this article will take you to see how MyBatis goes from building to executing our first SQL statement.This part of the co ...
Posted by rorobobo on Fri, 21 Feb 2020 19:46:42 -0800
Many to one processing
One to many processing
Before knowing many to one and one to many, the feeling after learning is like learning the joint table query in MySQL statements (there ...
Posted by ocpaul20 on Fri, 21 Feb 2020 05:42:24 -0800
0. Introduction to MyBatis
1) MyBatis is an open source Apache project iBatis, which was migrated to Google Code by Apache Software Foundation in June 2010. As the development team moved to Google Code, iBatis 3.x was officially renamed MyBatis and the code was migrated to Github in November 2013
2) The term iBatis comes from a combination of ...
Posted by nsantos on Fri, 14 Feb 2020 10:12:52 -0800
This article is not suitable for people who do not have the foundation of spring cloud.
This article is a shelf that I sorted out after learning spring cloud. Mainly for self study
Students who need source code are concerned about the following official account reply: xdxcloud
Posted by wiccan8888 on Fri, 14 Feb 2020 02:47:10 -0800
General Mapper notes
Build development environment (spring boot)
Database tableImport dependency
Posted by LightningSt on Wed, 12 Feb 2020 22:45:27 -0800
Just about to leave work, I was stopped by a development colleague. Let's see a strange problem: the query method of the same Mapper interface of Mybatis, the first return result is different from the second return result. I can't think about it!
Talk is heap. Show me the code
mapper interface definition
public interface GoodsTrackMap ...
Posted by jonorr1 on Wed, 12 Feb 2020 18:53:50 -0800
Management dao layer of mybatis framework
spring mainly manages the service layer
Spring MVC manages the cortroller layer
1. guide pack
2. Write web.xml. When Tomcat starts, load the web.xml file and put its contents into the spring container (webApplicationContext, which is the sub interface of applica ...
Posted by jim.davidson on Wed, 12 Feb 2020 07:58:06 -0800
Dynamic agents you have to learn
Background of problem
What are the problems?
Principle of dynamic agent
Background of problem
As a senior single dog, Xiaoqiang has finally ushered in her own spring. Under his relentless pursuit, Xiao Li ...
Posted by tsabar on Wed, 12 Feb 2020 04:38:18 -0800