Mybatis study notes
Mybatis-9.28
Environmental Science:
JDK1.8
Mysql 5.7
maven 3.6.1
IDEA
Review:
JDBC
Mysql
Java Foundation
Maven
Junit
SSM framework: of configuration files. The best way: look at the official website documents;
1. Introduction
1.1. What is Mybatis
MyBatis is an excellent persistence layer framework
It supports customized SQL, stored proced ...
Posted by simmosn on Tue, 09 Nov 2021 16:35:54 -0800
Mybatis framework learning notes -- [use of dynamic sql]
Documentation for mybatis3 version -- > mybatis document
Write in front Ok, which is also the part of dynamic sql; It should be noted that later, I added a column recording age to the employee table. Of course, I also added attributes and its getset method to the Employee class; Construction method; toString(); These are also added with ...
Posted by ryanhowdy on Fri, 05 Nov 2021 23:34:56 -0700
Mybatis basic module explanation and strengthening core principles
Basic support layer
The basic support layer is located at the bottom of the overall architecture of MyBatis, supports the core processing layer of MyBatis, and is the cornerstone of the whole framework. Several general and independent modules are encapsulated in the basic support layer. It not only provides basic support for MyBatis, but also ...
Posted by cahamilton on Wed, 03 Nov 2021 21:01:17 -0700
How to insert 100000 pieces of data in batches?
@[toc]Last week, brother song reprinted an article on batch data insertion. He talked with you about how to do batch data insertion quickly.After reading the article, a little partner put forward different opinions:Brother song had a serious chat with BUG and basically understood the meaning of this little partner, so I also wrote a test case a ...
Posted by Fjerpje on Tue, 02 Nov 2021 02:31:00 -0700
MyBatis framework dynamic Sql
MyBatis framework dynamic Sql
Dynamic SQL: judge the conditions through various tags provided by MyBatis to realize dynamic splicing of SQL statements. The expression used for conditional judgment here is OGNL expression.
The commonly used dynamic SQL tags are,,, and so on.
The dynamic SQL statement of MyBatis is very similar to the stat ...
Posted by Pyro4816 on Sat, 30 Oct 2021 02:13:56 -0700
Integrated Shiro framework for SpringBoot basic learning (Part 2)
preface:
Hello, guys, I'm running snail rz. Of course, you can call me snail Jun. I'm a rookie who has studied Java for more than half a year. At the same time, I also have a great dream, that is, to become an excellent Java Architect one day.
This SpringBoot basic learning series is used to record the whole process of learning the ...
Posted by wrapper on Mon, 25 Oct 2021 07:56:13 -0700
mybatis learning notes-04
1. Set log
Logs can facilitate our troubleshooting. They are not enabled by default. They need to be set in the core configuration file. name and value should be consistent with the official documents!
1.1 default log
<!--Set log default configuration-->
<settings>
<setting name="logImpl" value="STDOUT_LOGGING"/> ...
Posted by killerz on Fri, 22 Oct 2021 21:06:55 -0700
Chapter 2 Mapper mapping file of Mybatis framework
#1, Basic use
1.mybatis-config.xml template
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jianan.mapper.xxx">
</mapper>
2. Top level elements
The real power of MyBatis lies in its st ...
Posted by Yeodan on Fri, 22 Oct 2021 19:07:44 -0700
Chapter 1 global configuration file of Mybatis framework
1.mybatis-config.xml template
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
</configuration>
2. properties
Use example
These properties can be set in the child elements of the propertie ...
Posted by programming_passion on Fri, 22 Oct 2021 19:03:55 -0700
Mybatis generator source code learning and modification
Mybatis generator source code learning and modification
Required jar package: generator-mybatis-generator-1.3.2.jar
Background:
The company's database is divided into sub databases. During query, the customerId must be modified, otherwise the query efficiency will become low. The database table 60 +, almost every table of the new projec ...
Posted by rahnel on Fri, 22 Oct 2021 01:35:30 -0700