Mainstream Framework Learning - mybatis (java review day21)

I. mybatis Foundation 1. Analysis of Starter Case Design Mode public static void main(String[] args) throws Exception{ //Read Configuration File InputStream in = Resources.getResourceAsStream("SqlMapConfig.xml"); //Create SqlSessionFactory Factory /* Creating factory mybatis uses build ...

Posted by son.of.the.morning on Sat, 20 Jun 2020 19:15:42 -0700

Spring boot implements read-write separation (based on Mybatis, mysql)

Recently, the task is relatively light, and I have free time to learn learning technology, so I come to study how to realize the separation of reading and writing. Here we use blog to record the process. On the one hand, it can be viewed in the future, and on the other hand, it can also be shared with you (most of the information on the Interne ...

Posted by ctoshack on Tue, 16 Jun 2020 23:22:11 -0700

Chapter 2 Introduction to MyBatis

Simple Edition Create a test table Create the corresponding JavaBean Create mybatis configuration file and sql mapping file test MyBatis operation database Create MyBatis global profile The global configuration file of MyBatis contains settings and properties information, such as database connection pool information, which affect MyBatis' ...

Posted by sumolotokai on Tue, 16 Jun 2020 20:27:06 -0700

Mybatis Environment Configuration and CRUD

What is MyBatis? MyBatis is an excellent persistence layer framework that supports custom SQL, stored procedures, and advanced mapping.MyBatis eliminates almost all JDBC code and setting parameters and getting result sets.MyBatis can configure and map raw types, interfaces, and Java POJO s (Plain Old ...

Posted by smitho on Mon, 15 Jun 2020 18:22:30 -0700

About MyBatis, I've got 10 great ways to write it

  The label used to loop the container forEach, see the example The properties of foreach element mainly include item, index, collection, open, separator, close. item: the alias of the element iteration in the collection, Index: the index when the elements in the collection iterate open: in the ...

Posted by mebar3 on Mon, 15 Jun 2020 00:25:08 -0700

[MyBatis] several commonly used configurations to optimize our core configuration files (simple, easy to understand)

After setting up the MyBatis environment, we can make some common optimizations or other settings for MyBatis catalog Before that, our core configuration file was written like this After that, our core configuration file is written like this Reference external profile Log factory Hump naming co ...

Posted by veenasv on Sat, 13 Jun 2020 19:20:02 -0700

That's enough for rodert to teach you MyBatis-Actual Warfare

[toc] Article content picture upload failed, welcome to read, eBook in white. Preface Statement: Refer to the source Internet, any disputes can be left a message.Standing on the shoulders of the forefathers, we can see farther.This tutorial is all hands-on, dedicated to the most practical tutorials, does not require any rewards, and only wishe ...

Posted by bambambanana on Sat, 13 Jun 2020 10:41:23 -0700

Mybatis powerful result mapper ResultMap

1. Preface The resultMap element is the most important and powerful element in MyBatis. It frees you from 90% of JDBC ResultSets data extraction code, and in some cases allows you to perform operations that JDBC does not support. In fact, when writing mapping code for complex statements such as conn ...

Posted by neoson on Fri, 12 Jun 2020 00:27:50 -0700

Ganyibo ~ write a simple version of Mybatis, and take you to have a deep understanding of its charm!

Zero. Preparations <dependencies> <!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java --> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.20</version> </dependency> <!-- https://mvnre ...

Posted by coco777 on Thu, 11 Jun 2020 20:04:13 -0700

mybatis Source Parsing Interpretation Level 1 and Level 2 Cache

mybatis cache Mybatis caches have a first-level cache and a second-level cache. Why do mybatis use two caching mechanisms?Let's move on to today's topic with questions. mybatis Level 1 Cache When the mybatis cache executes the same SQL and the same parameters, it does not make repeated calls to the ...

Posted by dudeddy on Wed, 10 Jun 2020 09:29:36 -0700