spring Boot integrated multi data source (with paging)

According to the needs of the project, the front end needs to be provided with data from different databases. Now a variety of data sources are integrated: Direct post code: application.yml: #Port number: server: port: 8091 ################Journal################## logging: level: com.a ...

Posted on Sat, 18 Jan 2020 10:20:44 -0500 by jamz310

A trial of customizing mybaits framework

Article directory Preface Realization `pom` dependence `xml ` parsing class ` XMLConfigBuilder` The 'SqlSession' series of database transactions Abstract factory ` SqlSessionFactory` Default implementation factory ` DefaultSqlSessionFactory` Default implementation ` DefaultSqlSession` Builder mode ...

Posted on Sat, 18 Jan 2020 07:20:39 -0500 by konrados

Analysis of the implementation process and principle of the ORM of Mybatis

Article directory Preface First case Stepwise analysis Preface Go back to basics. Today, let's see the execution process of mybatis. First case 1, The first is the configuration file. You need an xml configuration file <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE configuration ...

Posted on Sat, 18 Jan 2020 07:05:31 -0500 by gromer

Mybatis executes the sql core method to add, delete and change Executor.update, query ResultSetHandler.handleResultSets

1. The underlying core interface for mybatis to add, delete and modify is Executor.update. If we want to intercept it, we need to intercept this method 2. The underlying core interface for mybatis to execute queries is ResultSetHandler.handleResultSets. If we want to intercept it, we need to interce ...

Posted on Thu, 16 Jan 2020 11:16:36 -0500 by Kestrad

MyBatis plug in development

1. Principle of mybatis plug-in MyBatis has plug-ins involved in the creation of four objects. The plug-in can use the dynamic proxy mechanism to wrap the target object layer by layer, and achieve the effect of intercepting before the target object executes the target method. When creating four object ...

Posted on Thu, 16 Jan 2020 10:20:49 -0500 by thirdeye

Integration of ssm framework (spring+ springMVC+MyBatis)

SSM framework integration 1. Construction environment 1.1 create data table The MySQL database is used to create a database named ssm and a table named account. CREATE DATABASE ssm; USE ssm; CREATE TABLE account( id INT PRIMARY KEY auto_increment, NAME VARCHAR(20), money DOUBLE ); 1.2 create ...

Posted on Wed, 15 Jan 2020 08:14:23 -0500 by maxsslade

New springboot + mybatis plus project

New springboot + mybatis plus project First, use idea to create a new SpringBoot [failed to transfer the pictures in the external chain. The source station may have anti-theft chain mechanism. It is recommended to save the pictures and upload them directly (img-4vpbYRCZ-1579060750966)(C:\Users\Leve ...

Posted on Wed, 15 Jan 2020 00:05:45 -0500 by squallm1

Spring boot uses quartz to dynamically add tasks

In the project, the page needs to dynamically add timed tasks and delete tasks. The practice of others is used for reference. Now the design method is recorded as follows:   1. Spring boot project directly depends on <dependency> <groupId>org.springframework.boot</groupId> ...

Posted on Mon, 13 Jan 2020 10:55:34 -0500 by csplrj

MyBatis Series: Using Type Processors in MyBatis

This blog mainly explains how to use type processors in MyBatis. 1. Define requirements At the beginning of the design, the enabled field of the sys_role table had two optional values, 0 for disabled and 1 for enabled, and we used the Interger type in the entity class: /** * Valid Sign */ private In ...

Posted on Sun, 12 Jan 2020 22:04:15 -0500 by komlos

Quick start to mybatis framework

Through the quick start example, we found it very easy to use mybatis, because you only need to write the Dao interface and follow the mybatis requires to write two configuration files to realize the function. It's much more convenient than our previous jdbc. (when we use annotations, we will It's simpler. Just write a mybatis configuration f ...

Posted on Sat, 11 Jan 2020 12:28:09 -0500 by tomkleijkers