Record website visits
1. Create a table in the database to store the hits
2. Create a listener (MyWebListener) to implement the ServletContextListener interface. When the project is started, the hits are obtained through the dao layer (ContextMapper) and stored in the ServletContext.
3. Increase the number of visits when vi ...
Posted on Tue, 30 Jun 2020 02:50:41 -0400 by Derokorian
java source learning - Mybatis creates statement and result set generation
Mybatis creates statement and result set generation
statementHandler
Result set processing
Postscript
Previous: Mybatis(3) executes sql procedure
statementHandler
In the Configuration class of Mybatis, there are the following three methods. If we want to generate a statement, we need to use a statement processor
publ ...
Posted on Sat, 27 Jun 2020 05:40:32 -0400 by maxpouliot
Beauty of Mybatis source code: 2.13. Parse the databaseIdProvider element and configure the database type unique flag generator
Parse the databaseIdProvider element and configure the database type unique flag generator
An interface named DatabaseIdProvider is defined in mybatis. The function of this interface is to obtain the unique flag of different data sources in mybatis.
DatabaseIdProvider defines two methods, setProperties() method is used to configure custom prope ...
Posted on Sat, 27 Jun 2020 02:10:05 -0400 by PHPoracle
Beauty of Mybatis source code: 2.6. Analyze the typeAliases element to complete the registration of type aliases
Resolve the typeAliases element to complete the registration of type aliases
> Click to see the usage of the typeAliases element
The typeAliases element is used to complete the configuration of type alias mapping in mybatis. We have learned a little about the type alias mechanism of mybatis. Its function is to provide a shorter name for the ...
Posted on Fri, 26 Jun 2020 23:58:33 -0400 by picos
Integrating SSM's Demo
Article catalog
1. Version selection
2. Using maven to create a project (project structure)
image-20200626115714873
3.pom.xml
4. Configuration file (under resources)
Configuration files for spring( applicationContext.xml)
springmvc-config.xml
mybatis-config.xml
jdbc.properties
log4j.properties
mappe ...
Posted on Fri, 26 Jun 2020 01:06:14 -0400 by Pintonite
Deep understanding of mybatis L2 cache
Deep understanding of mybatis L2 cache
In our daily projects, we often don't choose to use MyBatis's second level cache, because when you are not familiar with the second level cache. Because improper use can easily cause dirty reads, let's take a look at the slot points and highlights of L2 cache.
F ...
Posted on Fri, 26 Jun 2020 00:49:48 -0400 by ryanbutler
SSM learning notes - (spring MVC + Spring + mybatis) configuration (eclipse)
I've heard the teacher said that the whole family bucket of spring framework has never known what it is. I read a lot with a sense of mystery and didn't really understand it. I simply learned the configuration of SSM framework by taking the opportunity of practical training. Spring, as a novice of Xi ...
Posted on Tue, 23 Jun 2020 04:20:34 -0400 by galewis
Web05 mybatis advanced (using annotation development and SQL to build objects)
MyBatis advanced
Today, I'd like to share with you the following
Annotation implementation single table development
Annotation for multi table operation
SQL construction statement of MyBatis
Here are some key words of MyBatis annotation development
Annotation implementation single table developme ...
Posted on Sun, 21 Jun 2020 04:30:55 -0400 by dad00
MyBatis Series Part 5: MyBatis cache
1. What is MyBatis caching?
Using MyBatis cache can reduce the number of interaction between java application and database. From this point of view, its benefits are the same as using MyBatis to delay loading, which can improve the running efficiency of the program to a certain extent. For exampl ...
Posted on Sun, 21 Jun 2020 02:58:54 -0400 by springo
[emergency shelter] mybatis can use XML and annotation at the same time
[emergency shelter] mybatis can use XML and annotation at the same time
Put the conclusion first
How do you use it?
Mode 1
Mode 2:
Mode 3:
be careful:
Cause analysis
Reason for the establishment of mode 1
Limitations of mode 2
Reasons for the establishment of mode 3
be careful
Put the conclu ...
Posted on Sun, 21 Jun 2020 02:13:16 -0400 by KashKurcura