MyBatis3 - PageHelper
In the actual development, we always use paging query. Different database paging SQL methods are different. We can use paging plug-ins to help us separate queries. We only need to care about the data itself, not the place
1. Plug in introduction
Configure the paging plug-in in the core configuratio ...
Posted by angryjohnny on Sun, 02 Feb 2020 12:01:48 +0100
Read the source code of mybatis -- Interceptor
Reprinted from Read the source code of mybatis (8) -- Interceptor
1 Intercetor
MyBatis allows you to make intercept calls at some point during the execution of mapped statements. By default, MyBatis allows the use of plug-ins to intercept method calls including:
Executor (update, query, flushState ...
Posted by steelmanronald06 on Mon, 27 Jan 2020 06:01:59 +0100
Sharing custom page query tool of JAP list
The paging tool based on JPA supports multi table Association of native sql, and the generation of conditions only needs to be explicitly annotated on dto.
It can simplify development, improve development efficiency, and conform to the development habits of mybatis developers.
1. User defined cond ...
Posted by hightechredneck on Mon, 20 Jan 2020 17:46:08 +0100
Mybatis source learning (25)-StatementHandler parsing
I. Introduction
The StatementHandler is one of the most core interfaces of Mybatis. He has completed the work related to the interaction between Mybatis and database (the interaction between Mybatis and JDBC on Statement). StatementHandler is mainly used for:
Create Statement object
Bind ...
Posted by robsgaming on Sat, 18 Jan 2020 07:07:33 +0100
Leyou mall 1 - project construction
You can visit Code cloud - Leyou mall To get the engineering code of Leyou mall.
You can visit Baidu cloud leyouyou mall Password: ppzy to get information about Leyou mall.
1, Create parent project Maven Project to manage dependencies
GroupId: the unique identifier in the project, which corresponds to the package structure in java. Her ...
Posted by Pioden on Fri, 17 Jan 2020 14:01:24 +0100
Solve @ MapperScan scanning package mixed with @ Service and other problems
Problem description
@MapperScan annotation is generally configured to use dao or mapper's scanning package to operate the database, which is generally an interface. If there are other interfaces in dao layer, such as @ Service, an error will be reported
Solution 1
Remove the service package. The met ...
Posted by malam on Wed, 15 Jan 2020 13:35:10 +0100
SSM framework building tutorial project creation
The first time I wrote back-end, I went online to find many tutorials, but I didn't find many details. I found a lot of holes when I did it myself. I filled in the process of building the holes I met. As long as I followed the tutorial, you can build a complete ssm framework
Title first create project ...
Posted by blr32 on Wed, 15 Jan 2020 03:36:11 +0100
Important interfaces in Spring
1. BeanFactoryPostProcessor interface
Official website address: https://docs.spring.io/spring/docs/5.2.0.RELEASE/spring-framework-reference/core.html#beans-factory-extension-factory-postprocessors
org.springframework.beans.factory.config.BeanFactoryPostProcessor. The semantics of this interface are s ...
Posted by ericburnard on Tue, 14 Jan 2020 12:32:26 +0100
SpringBoot 2.X Integration Mybatis
1. Create a project environment
Check Web, Mybatis, MySQL as follows
Depends on the following
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>mysql< ...
Posted by mecha_godzilla on Wed, 08 Jan 2020 00:52:23 +0100
Implementation of MyBatis Association: One-to-One
There are two entities: user and membership card. A user can only process one membership card, that is, one-to-one.
user_tb: The primary key card_no of card_tb is introduced as the foreign key.
card_tb:
Mode 1: Use extension classes to implement one-to-one
(1) Create a new User class under the pojo package:
package com.chy.p ...
Posted by davestewart on Tue, 07 Jan 2020 18:25:11 +0100