Several common mybatis paging implementations

There are several ways to realize the paging of the mybatis framework. The simplest is to use the native sql keyword limit. The other is to use the interceptor to splice sql to achieve the same functions as limit. The other is to use the PageHelper. Here are three common implementation methods: No matter which implementation method is used, we ...

Added by FrobinRobin on Sun, 19 Dec 2021 17:23:28 +0200

Connecting Spring

Connecting Spring (1) Connecting Spring (2) 1, Integrate MyBatis The integration process is equivalent to transferring some contents written in the MyBatis configuration file to the Spring configuration file. Instead of creating objects through code, various MyBatis classes use the < bean > tag to create beans. Change the SqlSession ...

Added by Lord Sauron on Sun, 19 Dec 2021 13:57:33 +0200

Two methods of batch insertion in mybatis (efficient insertion)

Introduction to MyBatis MyBatis is an excellent persistence layer framework that supports common SQL queries, stored procedures and advanced mapping. MyBatis eliminates almost all the manual setting of JDBC code and parameters and the retrieval encapsulation of result sets. MyBatis can use simple XML or annotations for configuration and origin ...

Added by dmdmitri on Sun, 19 Dec 2021 11:57:15 +0200

For the use of mybatis cache, just read this article

The importance of caching is self-evident. Using cache, we can avoid frequent interaction with the database, especially when the more queries and the higher the cache hit rate, the use of cache can significantly improve the performance. mybatis also provides cache support, which is divided into L1 cache and L2 cache. H ...

Added by LuAn on Sun, 19 Dec 2021 06:40:26 +0200

Mybatis source code learning - plugin package

Mybatis series article navigation MyBatis provides plug-in functions, allowing other developers to develop plug-ins for MyBatis to extend the functions of MyBatis. With this plug-in function, developers can extend the functions of MyBatis. Develop a plug-in Before learning the source code, we must first know what functions it has and w ...

Added by name1090 on Fri, 17 Dec 2021 16:18:27 +0200

[SSM project: Java high concurrency spike API] 1 business analysis and DAO layer

1. Project overview 1.1 SSM framework advantages The framework is easy to use and lightweightLow code intrusionMature community and user base 1.2 introduction to relevant technologies 1.MySQL Table designSQL skillsTransaction and row level locks 2.MyBatis Design and development of DAO layerMyBatis rational useMyBatis and Spring i ...

Added by carobee on Thu, 16 Dec 2021 18:40:31 +0200

MBS13: simple use of log factory

13.1 introduction In the process of program development, we often need a lot of program debugging and troubleshooting. In the beginning stage, we often use South and debug to debug the program. The output information of the console is not detailed enough most of the time, so the log factory was born. We can more easily view the background log ...

Added by BluePhoenixNC on Thu, 16 Dec 2021 14:44:48 +0200

Multi data source transaction integration - mybatis plus

At present, most of what Baidu can search are aop and multi data source management implemented separately. It is complex to use, and it is not very perfect. For example, whether to consider nested transactions and the support method of multi data source transactions, many bloggers are not involved. Most of them are simple Interception Based on ...

Added by vapour_ on Thu, 16 Dec 2021 10:05:16 +0200

MyBatis source code analysis - plug-in related

In this article, I will introduce the source code of the plug-in. The MyBatis plug-in is a good function, similar to Spring's Aop, so that our users can operate SQL flexibly at specific points of the process. Allow me to quote an online introduction because I think it is well summarized: MyBatis allows us to intercept and call a certain point ...

Added by jtgraphic on Wed, 15 Dec 2021 22:22:13 +0200

Common problems encountered in myBatis and Spring coding

1. When the front and rear ends are connected, the list cannot be found when the private message list is displayed Error code: //List.jsp: <td><a href="/communications/${receiver}">private letter</a></td> Error reporting reason: MessageControl. The method call to return the private message page of the specified user ...

Added by rcmehta_14 on Wed, 15 Dec 2021 21:52:00 +0200