Teach you how to integrate Springboot+Maven+Mybatis with IDEA

IDEA teaches you how to integrate Springboot+mybatis+maven Recently, I encountered a series of problems when trying to write an introductory springboot project with IDEA. I read a lot of articles on the Internet, but I didn't find a perfect solution, so I plan to write a little white tutorial and take this opportunity to consolidate it. I Pro ...

Added by genius_supreme on Sat, 05 Mar 2022 03:49:56 +0200

Working principle and entry program of MyBatis

(1) Read the configuration file of MyBatis. mybatis-config.xml is the global configuration file of MyBatis, which is used to configure database connection information. (2) Load mapping file. The mapping file is the SQL mapping file, in which the SQL statements for operating the database are configured, which needs to be in the MyBatis config ...

Added by Placebo on Thu, 03 Mar 2022 15:31:53 +0200

MyBatis how to solve database data encryption and decryption

Preface: introduce a simple MyBatis encryption and decryption method. This method is rarely mentioned in daily study and work, so let's talk about it. If you already know this method, ignore this article 1, Background Sometimes in our database, some sensitive information of users, such as mobile phone number, bank card and other information, ...

Added by gordong1968 on Wed, 02 Mar 2022 15:31:46 +0200

[MyBatis notes] 7 - customize the mapping resultMap, handle the one to many / many to one mapping relationship, handle the consistency of attribute fields, and load MyBatis lazily

Video link: https://www.bilibili.com/video/BV1VP4y1c7j7?p=48&spm_id_from=pageDriver preparation (1) New maven project See the following steps for details: https://editor.csdn.net/md/?articleId=123185097 (2) Create two forms in sql: t_emp,t_dept t_dept form: t_emp form: Add a did to connect with the primary key of the ...

Added by BrettCarr on Tue, 01 Mar 2022 18:32:40 +0200

mybatis framework: first and second level cache

The previous article mentioned that the cache will be used when querying. Its built-in two-level cache is as follows:// The L1 cache is bound to sqlsession in the executor // org.apache.ibatis.executor.BaseExecutor#localCache // Point to org apache. ibatis. cache. impl. PerpetualCache#cache private Map<Object, Object> cache = new HashMap& ...

Added by ceemac on Tue, 01 Mar 2022 13:04:40 +0200

JDBC and Mybatis common bugs

Problem description Because spring boot usually simplifies the configuration and feels a little handmade, I handwritten JDBC and Mybatis in Mybatis class today. At the same time, there were several problems, which are recorded here. 0x01 JDBC insert Chinese garbled code The code is as follows The characters are still normal when the con ...

Added by devstudio on Mon, 28 Feb 2022 17:40:00 +0200

MyBatis dynamic sql, paging plug-in, cache

1, Important tags in xml 1.1. where label Query criteria entity class public class QueryTeamVO { private String name; private Date beginTime; private Date endTime; private String location; public QueryTeamVO() { } public QueryTeamVO(String name, Date beginTime, Date endTime, String location) { this.n ...

Added by erikjan on Sun, 27 Feb 2022 11:45:59 +0200

Summary of MyBatis learning notes [1]

Official learning documents Introduction to MyBatis mybatis is a persistence layer framework written in Java. He encapsulates many details of jdbc operation, so that developers only need to care about the sql statement itself, without paying attention to the complex processes such as registering drivers and creating connections. It uses t ...

Added by purpleshadez on Sun, 27 Feb 2022 10:56:40 +0200

Mybatis - dynamic SQL, paging plug-in

Dynamic SQL introduce In the mapping file of Mybatis, our SQL is relatively simple. Sometimes when the business logic is complex, our SQL changes dynamically. At this time, our SQL can not meet the requirements in the previous study. The official document on dynamic SQL reference is described as follows: Previous problems Example of mult ...

Added by miniature on Sat, 26 Feb 2022 22:34:36 +0200

Mybatis interface proxy method Dao

Dao interface proxy Case project skeleton What is agent development? Mapper interface development needs to follow the following specifications Write StudentMapper interface Case demonstration Source code analysis Analyze how dynamic proxy objects are generated? How is the analysis method performed? Dao interface proxy Case project sk ...

Added by cpharry on Sat, 26 Feb 2022 20:45:22 +0200