Tag:mybatis

  • Mybatis paging absolute path writing process detailed explanation

    Time:2021-5-4

    This article mainly introduces the mybatis paging absolute path writing process detailed explanation, the article through the example code introduction is very detailed, for everyone’s study or work has a certain reference learning value, need friends can refer to There are four steps, 1. Download the jar package. The coordinates of Maven are <dependency> <groupId>com.github.pagehelper</groupId> […]

  • Process instance analysis of mybatis executing SQL

    Time:2021-4-25

    This article mainly introduces the process instance analysis of mybatis executing SQL. The example code is introduced in great detail, which has a certain reference learning value for everyone’s study or work. Friends in need can refer to it This blog focuses on the process of executing SQL in mybatis. Details such as caching and […]

  • Mybatis implementation of SQL query interception modification

    Time:2021-4-11

    preface One of the functions of interceptors is that we can intercept the calls of some methods. We can choose to add some logic before and after the execution of these intercepted methods, or we can execute our own logic when executing these intercepted methods instead of executing the intercepted methods. An original intention of […]

  • The usage of foreach in mybatis

    Time:2021-3-29

    I’m doing mybatis mapper.xml File, we often use this situation: dynamic generation of SQL query conditions, this time we can use mybatis foreach The attributes of foreach elements mainly include item, index, collection, open, separator and close. Item: alias for iteration of elements in the collection. This parameter is required. Index: in list and array, […]

  • Summary of the use of mybatis if tag

    Time:2021-3-27

    Mybatis < if > tag is widely used in project development. This paper explains two ways of using if tag First, use the < if > tag to determine whether a field is empty Second, use the < if > tag to determine whether the incoming parameters are equal The specific code is as follows […]

  • Principle analysis of mybatis mapper dynamic proxy

    Time:2021-2-13

    preface Before we begin to explain the principle of dynamic proxy, let’s first take a look at the two implementation methods of Dao layer without dynamic proxy and using dynamic proxy after integrating mybatis. By comparing our own Dao layer interface and mybatis dynamic proxy, we can more intuitively show what mybatis dynamic proxy has […]

  • Detailed explanation of dynamic SQL of mybatis

    Time:2020-12-7

    One of the most powerful features of mybatis is its dynamic SQL capabilities. If you have experience with JDBC or other similar frameworks, you know how painful it is to conditionally concatenate SQL strings together, making sure you don’t forget spaces or omit commas at the end of a list. Dynamic SQL can deal with […]

  • Simple understanding of mybatis how to achieve SQL injection prevention

    Time:2020-10-27

    In this article, we need to learn how to use mybatis code to learn more about this article Mybatis framework is used in daily development. For example, there is a question in the interview: the difference between $and ා. The difference between them is that the use of ා can prevent SQL injection. Today, let’s […]

  • Explain how mybatis plus does not return a primary key when using insert

    Time:2020-9-22

    The project is built using springboot. At first, mybatis was used, and then it was upgraded to mybatis plus. According to the introduction of MP’s official website, using MP’s insert method, MP will write the primary key back to the corresponding attribute of the instance for the database table that is added automatically. But in […]

  • Analysis of dynamic SQL statement in mybatis

    Time:2020-9-17

    This article mainly introduces mybatis in the dynamic SQL statement parsing, the article through the example code introduction is very detailed, to everybody’s study or the work has the certain reference study value, needs the friend may refer to There are two ways to configure SQL in mybatis, one is to use XML to configure, […]

  • Simply understand the principle and example of mybatis interceptor

    Time:2020-9-10

    This article mainly introduces a simple understanding of the mybatis interceptor implementation principle and examples, the article through the example code is very detailed, for everyone’s study or work has a certain reference learning value, need friends can refer to Routine, first look at some basic concepts: The function of interceptor is that we can […]

  • The implementation of mybatis bulk insert data return primary key

    Time:2020-4-21

    Response effect (ID is primary key): { “data”: [ {“studentname”: “Zhang San”, “classno”: “class one”, “ID: 111}, {“studentname”: “Li Si”, “classno”: “class 2”, “ID: 112}, {“studentname”: “Wang Wu”, “classno”: “class one”, “ID: 113} ] } Control layer: @PostMapping(“/test”) @ResponseBody public Map<String, Object> test(@RequestBody String data) { Map<String, Object> resultMap = new HashMap<String, Object>(); //Non empty […]