Paging with mybatis PageHelper

frame address: https://github.com/pagehelper/Mybatis-PageHelper/blob/master/wikis/zh/HowToUse.md Reference documents address: https://blog.csdn.net/she_lock/article/details/79975907 pom dependence <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</a ...

Posted by madsosterby on Thu, 02 Jan 2020 10:47:17 +0100

Mybatis generator: a plug-in for mybatis to automatically generate entity code

To use the Mybatis plug-in in maven project to automatically produce entity classes and mapping files, the following steps are required: 1. Create generatorConfig.xml file (1) create plug-in file (2) configure the path of relevant production files and the configuration of relevant parameters 2. Configure pom.xml (1) add re ...

Posted by cupboy on Wed, 01 Jan 2020 14:09:45 +0100

Differences between Mybatis Source Series 3-3 SqlSession s

No matter when you start, it's important not to stop after you start Three SqlSession s DefaultSqlSession and SqlSessionManager and SqlSessionTemplate are three common sqlsesion s I have From the class diagram, you can see that all three of them have implemented SqlSession, that is, they can all represent a session.Unlike others, SqlSessionM ...

Posted by LearningKid on Tue, 31 Dec 2019 03:04:33 +0100

Enterprise springboot tutorial (7) springboot enables declarative transactions

springboot is very simple to start a transaction, only one annotation is needed @Transactional Just fine. Because in springboot, events have been enabled for jpa, jdbc and mybatis by default. When they are introduced, things will be enabled by default. Of course, if you need to use other orm, such as beatlsql, you need to configure the relevant ...

Posted by adriaan on Sun, 22 Dec 2019 18:24:06 +0100

Spring cloud Alibaba microservice Practice II - service registration

Introduction: in the previous article, we have prepared the basic components based on spring cloud Alibaba. The main content of this issue is to register all services into Nacos, and enable account service and product service to provide basic addition, deletion, modification and query capabilities. Basic framework construction Create a multi m ...

Posted by kamasheto on Tue, 10 Dec 2019 22:52:57 +0100

Type processor for Mybatis

When Mybatis sets a parameter in the prepared statement, it uses the default typeHandler for processing. When you want to search a person's information by name <select id="getRole" parameterType="string" resultRole="role"> select rolename,phonenumber from t_role where rolename = #{rolname} </select> When Mybatis calls this query ...

Posted by saco721 on Sat, 07 Dec 2019 09:33:27 +0100

Difference between selectByExample and selectByExampleWithBLOBs in MyBatis

First, paste an automatically generated Mapper code <select id="selectByExample" parameterType="com.pojo.TbItemParamExample" resultMap="BaseResultMap"> <select id="selectByExampleWithBLOBs" parameterType="com.pojo.TbItemParamExample" resultMap="ResultMapWithBLOBs"> Here we find that their return values are different. <resultM ...

Posted by richie19rich77 on Fri, 06 Dec 2019 02:31:24 +0100

How many positions does fastjson customize serialization have?

This article describes the various operations of fastjson custom serialization. 1. What is fastjson? fastjson is Alibaba's open source JSON parsing library that parses strings in JSON format, supports serialization of Java Bean s to JSON strings, and can also deserialize from JSON strings to JavaBean s. 2. How to Use Add the following maven d ...

Posted by kir10s on Thu, 05 Dec 2019 21:42:54 +0100

Implementation of two data sources: SpringMVC+Mybatis

I. configuration file structure First of all, the structure of the configuration file is as follows Here are a few key configurations 1. jdbc.properties #============================================================================ # datasource 1 #============================================================================ #Da ...

Posted by nitharsanke on Sun, 01 Dec 2019 20:53:48 +0100

mybatis implements the user-defined sql parameterization and binds the parameters within the parameters

In some business scenarios, multiple tables are needed to perform statistical operations jointly. In such scenarios, the logic of sql is often complex, and it is difficult to write it out easily by using mybatis. At the same time, various business variables are very large, so it is a little weak to deal with it based on mybatis. ...

Posted by loveitandhateit on Sat, 30 Nov 2019 11:12:16 +0100