Mybatis -- a common tag in XML

Insert – map insert statements.Update – map update statements.Delete – map delete statements.select – map query statementsql – repeatable sentence blocks that can be referenced by other statementsresultMap – describes how to load objects from the database result set. It is the most complex and powerful elemen ...

Added by zgkhoo on Mon, 03 Jan 2022 02:46:52 +0200

Expressions of greater than sign and less than sign in MyBatis

1. Scene restore In the actual project, there are many needs to search or filter the required data by setting a specific time period. Today, the author gives a detailed explanation on the application method of greater than and less than signs involved in time comparison in mybatis. 2. Implementation plan Here are two possible methods: ① Esc ...

Added by doctor_james on Mon, 03 Jan 2022 01:56:37 +0200

[MyBatis series 4] integration of MyBatis and Spring Boost

Mainly explain the integration process of MyBatis and Spring Boost through examples. preface Last month, I saw the project code written by my colleague and found that there was no XML file in MyBatis. I asked him, "MyBatis is integrated with Spring. I have written a Demo before. Shouldn't there be XML file configuration?", Th ...

Added by mortal991 on Sun, 02 Jan 2022 16:08:38 +0200

The custom TypeHandler in Mybatis handles an exception handling of enumeration classes

In mybatis, we can customize the parameter encapsulation policy when setting parameters or fetching the result set in the form of custom TypeHandler. For example, if the status code of an employee is 100, we display the status code 100 in the status code column empStatus in the database, but when querying the employee in the database through ...

Added by sunnysideup on Sun, 02 Jan 2022 08:43:10 +0200

[MyBatis Series 2] integration of MyBatis and Spring

Explain the integration process of MyBatis and Spring through examples. preface This example of MyBatis and Spring integration was written when I needed to be familiar with MyBatis when I first transferred in March this year. I mainly wanted to know how the project uses MyBatis in Spring from 0 to 1. This example refers to the "C ...

Added by Chiaki on Sun, 02 Jan 2022 07:22:59 +0200

springboot integrates Druid+mybatis

Druid Spring boot integrated Druid scheme: one is to directly configure Druid spring boot starter in POM without writing any code; One is to configure druid and write a few lines of code, which can be added; On the basis of scheme 1, add stat and wall to verify login. First present the github code address: https://github.com/yudiandemingzi/ ...

Added by Headwaters on Sun, 02 Jan 2022 06:14:59 +0200

Obtaining SqlSession from MyBatis principle analysis

Front blog: Obtaining SqlSessionFactory for MyBatis principle analysis , this is a sequel. The sqlsession is obtained mainly through several overloaded methods of SqlSessionFactory, and the Transaction is obtained by obtaining the datasource and transactionFactory from the environment in the configuration. Then get Transaction, Executor and De ...

Added by lala on Sat, 01 Jan 2022 19:28:46 +0200

Crazy God says Mybatis08: cache

cache 1. Introduction 1. What is Cache? There is temporary data in memory. Put the data frequently queried by users in the cache (memory), and users do not need to query from the disk (relational database data file) but from the cache to query the data, so as to improve the query efficiency and solve the performance problem of high concurr ...

Added by jennifer_ann on Sat, 01 Jan 2022 16:07:30 +0200

Introduction to mybatis

1, Environment construction   create maven web project mybatis01 and add maven dependencies as follows. <dependency> <groupid>org.mybatis</groupid> <artifactid>mybatis</artifactid> <version>3.4.6</version> </dependency> <dependency> <groupid>mysql</groupid ...

Added by dreamdelerium on Sat, 01 Jan 2022 09:29:39 +0200

12. Dynamic SQL for MyBatis

12. Dynamic SQL What is dynamic SQL? Dynamic SQL is to generate different SQL statements according to different conditions Dynamic SQL is one of the powerful features of MyBatis. If you have used JDBC or other similar frameworks, you should be able to understand how painful it is to splice SQL statements according to different conditions. Fo ...

Added by netman182 on Sat, 01 Jan 2022 05:29:41 +0200