Spring boot integrates the addition, deletion, modification and query operations of Mybatis on a single table
I. objectives
Spring boot integrates the addition, deletion, modification and query operations of Mybatis on a single table
2, Development tools and project environment
IDE: IntelliJ IDEA 2019.3
SQL: Navicat for MySQL
3, Basic environment configuration
Create database: demodb
Create data table and insert data
DROP TABLE IF EXISTS t_empl ...
Posted by wstran on Sat, 07 Mar 2020 08:05:38 -0800
Spring boot integrates mybatis plus multi data source Druid monitoring, Atomikos deals with transactions, cross database and linked table query
Spring boot integrates mybatis plus (2) multi data source Druid monitoring, Atomikos deals with transactions, cross database and linked table query
In the previous chapter, I used springboot project to integrate mp, mp basic use, code generator use, Druid data monitoring, etc., but only for single dat ...
Posted by joshbb on Thu, 05 Mar 2020 01:36:39 -0800
Mybatis basic knowledge learning
This article mainly introduces mybatis and its simple use, which is very simple. The relevant content is not in-depth, nor in-depth study of its principle. The focus is on how to use it. There may be some small problems in some places. Please forgive me a lot. Thank you~
1, About Mybatis
MyBatis is a ...
Posted by glcarlstrom on Wed, 04 Mar 2020 22:36:05 -0800
Spring boot integrates MyBatis to add, delete, modify and check the complete version of case (with source code)
1. introduction
Spring Boot is a framework to simplify spring development. It is used to monitor the spring application development. The Convention is larger than the configuration. just run can create an independent, product level application.
When we use Spring boot, we only need to configure the corresponding Spring boot to use all the Sprin ...
Posted by Shibbey on Wed, 04 Mar 2020 02:41:19 -0800
Notes on Java 8 - Chapter 23 notes
It's all notes of personal learning process, not summary, no reference value, but this book is great
Basic grammar
Definition annotation
Annotations usually contain elements that represent specific values. These values can be used by programs or tools when analyzing and processing annotations. Th ...
Posted by guoxin on Mon, 02 Mar 2020 20:30:38 -0800
MyBaits - CRUD operations, alias configuration, attribute configuration, query result mapping, Mapper components, parameter processing, annotation development for MyBatis
Catalog
CRUD Operation of MyBatis
2. MyBatis Expansion
1. Alias Configuration Processing
1.2, Custom Alias
1.3. Aliases that come with the system
2. Attribute Configuration Processing
3. Query Result Mapping
3.1. How to alias fields
3.2, resultMap element
4. Mapper Components
4.1, Mapper ...
Posted by MorganM on Mon, 02 Mar 2020 17:34:33 -0800
Notes on the development of mybatis+jpa
1. Add, delete, modify and check.
1, For the add operation, if the id is generated automatically, the primary key needs to be returned. Note that if the primary key is of Long type, the int type should also be returned, because mybatis does not support Long.
mybatis ResultMap application
My ...
Posted by krraleigh on Sun, 01 Mar 2020 19:20:45 -0800
MyBatis source code parsing -- MyBatis initialization process parsing
1. Preparation
To see the whole initialization process of MyBatis, first create a simple Java project. The directory structure is shown in the following figure:
1.1 Product entity class
public class Product {
private long id;
private String productName;
private String productCo ...
Posted by youngsei on Sat, 29 Feb 2020 23:25:01 -0800
MyBatis Cache Configuration
Level 1 Cache
Mybatis supports caching, but by default without configuration, it only turns on the first level cache, which is relative to the same SqlSession.So when we invoke a Mapper method using the same SqlSession object with exactly the same parameters and SQL, we usually execute SQL only once ...
Posted by fatmikey on Tue, 25 Feb 2020 18:15:43 -0800
Principle analysis of mybatis Spring integration
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