Build the first MyBatis program
Project construction
IDEA creates an empty maven projectIn the parent project POM Add dependencies to XML (mysql driver, mybatis dependency, and junit unit test)Add a sub project to improve the package structure
<dependencies>
<!-- mysql drive-->
<dependency>
<groupId>mysql</groupId>
...
Added by raw100 on Sat, 22 Jan 2022 00:25:42 +0200
Spring Boot learning notes - Spring Boot integration Shiro
Spring Boot learning
Official website: https://spring.io/projects/spring-boot#overview
file: https://docs.spring.io/spring-boot/docs/2.2.6.RELEASE/reference/html/
Reference video: [crazy God says Java] the latest tutorial of SpringBoot, IDEA version, is easy to understand_ Beep beep beep_ bilibili
Project complete reference code: lexi ...
Added by Fazer on Thu, 20 Jan 2022 23:52:53 +0200
Delayed loading of mybatis source code analysis extension
1, What is deferred loading
In the development process, we do not always need to load the user's order information when loading the user's information. This is what we call delayed loading.
1. Definition of delayed loading
Delayed loading is to load when data is needed, and not when data is not needed. Lazy loading is also called lazy lo ...
Added by chaser7016 on Thu, 20 Jan 2022 02:06:00 +0200
Mybatis plus common annotations and plug-ins
Mybatis plus common annotations and plug-ins (II)
1, @ TableName
value attribute
The name of the entity class is User and the name of the database table is t_user
@TableName(value = "t_user")
public class User {
//...
}
2, @ TableId
1. Snowflake algorithm
By default, the id column of the database is generated by the strategy based o ...
Added by ultrus on Wed, 19 Jan 2022 02:39:05 +0200
Delayed loading mechanism of mybatis
Delayed loading mechanism of mybatis
The meaning of delayed loading: relevant operations will be carried out only when it is used
Mybatis supports delayed loading of association Association objects and Collection association collection objects
Difference: association usage scenario is a one-to-one association query, and collection is a one t ...
Added by frankstr on Tue, 18 Jan 2022 00:42:40 +0200
[crazy God says Java] Mybatis
Mybatis
environment
JDK1.8Mysql5.7maven 3.6.3IDEA
review
JDBCMysqlJava FoundationMavenJunit
SSM framework: the best way to configure files: see the official website documents
Mybatis
1. Introduction to Mybatis (October 21, 2020)
1.1 what is Mybatis
How to get Mybatis
maven warehouse:
<!-- https://mvnrepository.com/artifact/org ...
Added by joeynovak on Mon, 17 Jan 2022 20:36:26 +0200
Mybatis--Universal Map--mappers--Cache-LOG4J--MyBatis Paging Plug-in--Developed with Annotations---#{} Difference from ${}--Lombok--Many-to-Many Processing Dynamic SQL
MyBatis
Environmental Science:
JDK1.8Mysql 5.7maven 3.6.1IDEA
Review:
JDBCMysqlJava FoundationMavenJunit
SSM framework: Configuration file. Best way: see the official website documentation;
mybatis - MyBatis 3 | Getting Started
1. Introduction
1.1, What is Mybatis
MyBatis is an excellent persistence framework. It supports customizing S ...
Added by JRS on Mon, 17 Jan 2022 10:25:04 +0200
Build the simplest multi data source with mybatis plus as the framework (different data sources under different packages)
1.1 introducing pom dependency
When introducing SpringBoot and SpringCloud versions, pay special attention to their compatibility Reference: https://spring.io/projects/spring-cloud
<!--introduce springboot Parent project dependency-->
<!--Introduce dependency:
It can be omitted version Tag to get some reasonable ...
Added by fred_m on Mon, 17 Jan 2022 02:18:53 +0200
2021-07-18 mybatis puls quick start
MyBatisPlus
MyBatisPlus overview
brief introduction
MyBatis is meant to simplify JDBC operations! Official website: https://mp.baomidou.com/
MyBatis Plus simplifies MyBatis!
characteristic
No invasion: it is only enhanced without change, and its introduction will not affect the existing project, which is as smooth as silk L ...
Added by gplaurin on Sun, 16 Jan 2022 12:09:33 +0200
Mybatis IV: mybatis configuration summary
https://mybatis.org/mybatis-3/zh/index.html
1, Mybatis official website definition
Mybatis configuration
1. Type aliases
Type alias sets an abbreviated name for a Java type. It is only used for XML configuration and is intended to reduce redundant fully qualified class name writing. For example:
<typeAliases>
<typeAlias alias ...
Added by mmorton on Sun, 16 Jan 2022 07:42:25 +0200