Mybatis is a persistence layer framework. In detail, it is a version persistence framework. It is configured through simple xml or annotations, so that the operation of the database is not so cumbersome;
What is mybatis
mybatis is a retrograde mapping framework, which is used to solve some problems encountered in database operation;
As t ...
[idea2020.1.1] hibernate is a framework applied in the DAO layer. The functions of DBUtils used before are similar [distinction – > Java EE's three-tier architecture and MVC idea: Java EE three-tier structure: web layer, service layer and dao layer; MVC idea m: model, v: view, c: controller]
Find jar package
jar package acquisiti ...
Added by Brad7928 on Sat, 22 Jan 2022 11:15:25 +0200
Delayed loading mechanism of mybatis
The meaning of delayed loading: relevant operations will be carried out only when it is used
Mybatis supports delayed loading of association Association objects and Collection association collection objects
Difference: association usage scenario is a one-to-one association query, and collection is a one t ...
Added by frankstr on Tue, 18 Jan 2022 00:42:40 +0200
In the previous section E-commerce project (24) - log printing , mainly explain the basic usage of slf4j log framework.
This article briefly explains how to realize unique login for member services.
1. What is a unique login?
We often use QQ, wechat, nailing and other social applications. They all support logging in on the ...
Added by gOloVasTicK on Tue, 11 Jan 2022 12:14:24 +0200
Data connection pool
Basic idea of database connection pool
Is to establish a "buffer pool" for database connections. Put a certain number of connections in the buffer pool in advance. When you need to establish a database connection, just take one from the buffer pool and put it back after use.
Introduction to database connec ...
Object is the base class of all classes in java. It is the top of the entire class inheritance structure and the most abstract class. Everyone uses toString(), equals(), hashCode(), wait(), notify(), getClass() and other methods every day
The first stage of class loading is to load classes Load the class file into memory an ...
Added by mccark on Mon, 20 Dec 2021 05:18:04 +0200
JPA Hibernate 5 lazy load
Cause: there is a large field (rich text field with base64 image) in the project. When querying the front end, you don't want every entity class to carry this field, so you try to load it lazily
The test writes a student class, where description is a large field that needs to be loaded lazily, and there are some one- ...
Added by ReignFire on Wed, 15 Dec 2021 05:56:49 +0200
Programming transaction control related objects
Programming is to write code by using Java API. Declarative is to configure some things in the way of configuration
The PlatformTransactionManager interface is the transaction manager of spring. It provides our common methods of operating transactions, that is, how tr ...
Objectives: 1: Understanding one to many relationships
2: Understand lazy loading and forced loading
3: Understanding one to many autocorrelation
4: Understanding many to many relationships
1, One to many association, lazy loading and forced loading
One to many association configuration (environment: order (1) and order details (m ...
Added by wpsd2006 on Mon, 01 Nov 2021 21:51:16 +0200
1. One to many association configuration (database: master table, slave table, association through foreign keys)
2. Lazy loading
3. One to many autocorrelation
4. For many to many association, many to many cannot be directly mapped in the database (create a bridge table (intermediate table) and convert a many to many relations ...
Added by isam4m on Thu, 28 Oct 2021 10:50:07 +0300