Mybatis parameter (Parameters) pass
1.. Single parameter
Values of basic type, object type, collection type can be accepted.In this case, MyBatis can use this parameter directly without any processing.
<!-- according to id Query a record in a data table and encapsulate it User object -->
<select id="selectById" resultType="com.s ...
Posted by mailtome on Tue, 14 Jul 2020 08:23:04 -0700
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 by tzikis on Tue, 30 Jun 2020 00:03:17 -0700
Last article we wrote about static agents Agent mode of design mode  static agent
Let's talk about java's dynamic proxy today.
1, Why use dynamic proxy
In fact, the dynamic agent makes up for the shortcomings of the static agent. The static agent needs to write a proxy class for each proxy object, ...
Posted by shiznatix on Sun, 28 Jun 2020 20:14:24 -0700
Interested friends can go to understand the first five articles, your praise is my greatest support, thank you!
(1) SpringBoot take off - HelloWorld
(2) The way to take off of SpringBoot: an analysis of the entry principle
(3) SpringBoot take off road - YAML configuration summary (must know before gett ...
Posted by tsinka on Sat, 27 Jun 2020 21:54:52 -0700
Parse the objectFactory element and configure the object creation factory of mybatis
In Mybatis, there are many operations to instantiate objects through reflection, such as converting JDBC operation results to specific instance objects based on reflection.
For example, the following data are available:
Posted by gazoo on Fri, 26 Jun 2020 20:48:57 -0700
Parse the plugins element to complete the configuration of mybatis plug-in
> Click to see the usage of the typeAliases element
The plug-in mechanism of Mybtis is a very powerful function, which allows us to cut into the inside of Mybatis to perform some of the things we want to do during the operation of Mybatis.
Page helper, a popular pagin ...
Posted by mistercoffee on Fri, 26 Jun 2020 20:44:20 -0700
Two days ago, we introduced Multi data source configuration of JdbcTemplate as well as Multi data source configuration of Spring Data JPA , let's talk about how to configure the multi data source scenario when using MyBatis.
Add configuration for multiple data sources
First, in the configuration file of ...
Posted by osti on Thu, 25 Jun 2020 19:19:18 -0700
Install idea, configure jdk,tomcat, maven, MySQL and other environments. In this case, JDK1.8, Tomcat 8.0, maven 3.6.0, idea2018, mysql5.6 and sqlyog are used
2. Introduction to the case:
The integration of parent-child modules of ssm is built from scratch. This case is based on the ...
Posted by spaceknop on Tue, 23 Jun 2020 22:25:55 -0700
One to many paging of MySQL data is a very common requirement. For example, we need to query the product and the image information of the product. But many people will encounter the mistake of pagination here and get incorrect results. Let's analyze and solve this problem today.
2. Problem analysis
First, we create a simple product ...
Posted by cs-web on Mon, 22 Jun 2020 20:39:35 -0700
"Connection pool & mybatis introduction notes"
Be able to understand the principle of connection pool to solve current problems
Able to use C3P0 connection pool
Ability to use DRUID connection pool
Master the quick start of mybatis framework development
Posted by spires on Sun, 21 Jun 2020 00:12:55 -0700