Looking at JDK dynamic agent from mybatis source code

Many articles about dynamic agent on the Internet are like this: A Real class for practical work; a Proxy class created. Proxy calls the proxy method in Real, and prints some strings before and after the proxy method. For example: 1 public class JdkProxy { 2 static interface IProxy{ 3 String say(String s); 4 } 5 static ...

Posted on Mon, 06 Apr 2020 03:32:00 -0400 by nikifi

Association union select in MyBatis

Association and select are easy to travel   mapper configuration:   <resultMap type="com.demo.sys.entity.Menu" id="menuMap">       <id property="id" column="id" />       <result property="name" column="menu_name" />       <result property="url" column="url" />       <result property="active ...

Posted on Sun, 05 Apr 2020 22:39:53 -0400 by kcomer

Spring Launch invokeBeanFactoryPostProcessors Method Interpretation

Summary This method (invokeBeanFactoryPostProcessors) instantiates and calls all BeanFactoryPostProcessors, including its subclass BeanDefinitionRegistryPostProcessor. The BeanFactoryPostProcessor interface is an extension point exposed to Spring when it initializes BeanFactory, and the Spring IoC container allows BeanFactoryPostProcessor to re ...

Posted on Sat, 04 Apr 2020 06:13:59 -0400 by Catfish

mybatis develops "three swordsmen"

Automatic generation of mybatis generator code Mybatis generator is a good tool for automatic code generation of mybatis. It's very troublesome to write entity classes, mapper s and xml configuration files manually. Using mybatis generator only needs simple configuration. Here is a brief description of the development steps. ...

Posted on Fri, 03 Apr 2020 20:12:47 -0400 by noodle

Mybatis Reverse Engineering plus Maven plug in

1. Plug in introduction This plug-in is an enhanced version of Maven plug-in based on mybatis in idea, and supports the following operations: 1) Chinese notes of corresponding table fields of self defined import database 2) Suffix rename of Mapper and dao files 3) Implementation of paging class 4) Lombok integration can simplify the code 2. P ...

Posted on Fri, 03 Apr 2020 18:08:50 -0400 by woozy

[ShardingSphere] 4.Spring Boot integrates sharding JDBC to realize database splitting and table splitting + read-write separation

Framework When the amount of data is not large, we can separate the reading and writing of the database to meet the demand of high concurrency. We can alleviate the pressure of query by expanding the database horizontally. As follows: When the amount of data reaches 5 million, then the amount of data is estimated to be tens of millions, and ...

Posted on Thu, 02 Apr 2020 15:07:14 -0400 by chandan_tiwari

MyBatis framework configuration and use 2

MyBatis framework configuration and use 2 Original December 24, 2017 22:36:32 <ul class="article_tags clearfix csdn-tracking-statistics tracking-click" data-mod="popu_377" style="display: none;"> <li class="tit"><font style="vertical-align: inh ...

Posted on Thu, 02 Apr 2020 07:33:00 -0400 by stephenk

Summary of MyBatis learning

The return type of each query map of MyBatis is resultmap. However, when the return type property provided by us is resultType, MyBatis automatically assigns the corresponding value to the property of the object specified by resultType. When the return type provided by us is resultmap, it will data base The middle column data i ...

Posted on Tue, 31 Mar 2020 18:17:58 -0400 by Gump

Mybatis framework 1: build test

The Mybatis framework no longer introduces: There are some problems in JDBC: 1. Frequent connection and release of resources waste memory 2. The coding is not easy to maintain So we have a framework to simplify database operation: Hibernate, Mybatis and so on. Here we introduce Mybatis   Download address: https://github.com/mybatis/mybatis-3/re ...

Posted on Tue, 31 Mar 2020 16:30:33 -0400 by david-remone123

Simulated MyBatis source code-V2.0

The previous version is too simple. This version creates config, executor, handler, and mapped statement according to the source code format. The entire project structure is as follows: This project simulates several main categories of MyBatis: sqlsession, configuration, executor, mapperproxy, mappedstatement, result ...

Posted on Tue, 31 Mar 2020 04:33:19 -0400 by nootropil