Mybatis (2) Parameters transfer
Mybatis parameter (Parameters) pass
1.. Single parameter
Values of basic type, object type, collection type can be accepted.In this case, MyBatis can use this parameter directly without any processing.
<!-- according to id Query a record in a data table and encapsulate it User object -->
<select id="selectById" resultType="com.s ...
Posted by aidema on Tue, 14 Jul 2020 17:19:14 +0200
Mybatis (2) Parameters transfer
Mybatis parameter (Parameters) pass
1.. Single parameter
Values of basic type, object type, collection type can be accepted.In this case, MyBatis can use this parameter directly without any processing.
<!-- according to id Query a record in a data table and encapsulate it User object -->
<select id="selectById" resultType="com.s ...
Posted by Errant_Shadow on Tue, 14 Jul 2020 17:19:34 +0200
Solution with empty list in foreach tag in Mybatis
In the previous article Optimizing Mybatis in-query through interceptor Interceptor In, we have resolved the case of an empty in() list in the mybatis query.
However, because the list in the foreach tag is empty, not only is an in() empty list, but another common situation occurs when data is inserted in batches, as follows:
INSERT INTO table1( ...
Posted by eurozaf on Mon, 13 Jul 2020 17:30:03 +0200
web front-end project integrates both JSP and FreeMaker_u_Multi-view Parser Configuration
*In 2017, at the request of the company, responsible for research and development of intelligent analysis platform, using OLAP technology to analyze tax data from multiple dimensions, levels and cross-business domains, discover data characteristics, summarize tax laws, and support leadership decision-making. After nearly a year, it was finally ...
Posted by brob on Wed, 08 Jul 2020 16:28:31 +0200
One level of mybatis cache
For the mybatis framework. It seems to be used in copy all the time. For mybatis caching. There is no accurate cognition. Take advantage of the holiday. Learn the cache of mybatis. This article mainly studies the first level cache of mybatis.
Why cache
In fact, we have been working for a long time, and we know that many bottlenecks ar ...
Posted by yelvington on Sat, 27 Jun 2020 09:29:25 +0200
Beauty of Mybatis source code: 2.11. Initialize global configuration through settings configuration
Initialize global configuration through settings configuration
When it comes to initializing the global Configuration of Mybatis through settings, it is difficult for us to bypass the Configuration object of Mybatis.
Configuration object is undoubtedly one of the core objects of Mybatis. It defines many properties and methods. In the process of ...
Posted by aQ on Sat, 27 Jun 2020 07:43:54 +0200
Beauty of Mybatis source code: 2.12. Parse the 'environments' element to complete the multi environment configuration in' Mybatis'
Parsing environment elements to complete multi environment configuration in Mybatis
After finishing the tedious process of configuring the Configuration object based on settings, it's time to parse the environments tab and configure the Mybatis multi environment.
Mybatis supports multi Environment configuration by default. There is an Environme ...
Posted by salathe on Sat, 27 Jun 2020 06:24:08 +0200
Spring Boot: integrate basic operations of JPA and MyBatis
PostgreSQL is an object relational database management system (ORDBMS) of free software with complete characteristics. It is an object relational database management system based on POSTGRES, version 4.2 developed by the computer department of the University of California. Many of the leading concepts ...
Posted by buducom on Thu, 25 Jun 2020 10:26:30 +0200
Spring boot principle: the starting principle of source code analysis
catalog
1, Introduction to spring boot analysis
2, Spring boot annotations to be covered
1.@SpringBootApplication
2.@SpringBootConfiguration
3.@EnableAutoConfiguration
4.@AutoConfigurationPackage
5. Some annotations in the xxxautoconfiguration class
3, Spring application initialization proces ...
Posted by aseaofflames on Mon, 22 Jun 2020 10:48:12 +0200
Dynamic sql splicing in mybatis
Before moving on to dynamic sql, let's start by saying that a user's id in real development is usually out of order, such as random generation using UUID s. Write one below.
public class UUIDGenerate {
public static String getIdByUUID(){
return UUID.randomUUID().toString().replaceAll("-" ...
Posted by c-o-d-e on Sat, 20 Jun 2020 18:12:19 +0200