mybatis - Cascading queries one-to-many (set mapping)
Original Text
http://blog.csdn.net/yulei_qq/article/details/22057633
theme
MyBatis
There are two ways to associate nested queries with nested results, which is explained in this paper.
The previous chapter describes a many-to-one relationship, using <association></association>, which is a complex type of association ...
Posted by OopyBoo on Wed, 03 Jul 2019 09:24:09 -0700
Data Source and Connection Pool in Mybatis
In the previous article< Detailed description of <environments> configuration elements for Mybatis configuration > We already know that there are two configurable elements, one is the configuration of data source and connection pool, and the other is the configuration of transaction manager. In the last article, we just described br ...
Posted by soulreaver on Sun, 30 Jun 2019 18:19:40 -0700
A lightweight solution for mybatis to support database lightweight compatibility
I love mybatis because of the freedom of sql mapping, sql in the hand, everything I have that feeling!However, due to its incomplete ORM framework, we gain the freedom of SQL and lose the natural feature of ORM-compatible multilibraries.This article tells you how to make mybatis lightweight support database compatibility?
Beacuse of some reason ...
Posted by kurtis on Sun, 30 Jun 2019 17:41:08 -0700
Basic Use of MyBatis
MyBatis is a lightweight ORM library. MyBatis can store POJO classes into databases or convert data from databases into POJO classes. Unlike Hibernate and other libraries, MyBatis recommends using the way of writing SQL statements in XML configuration to convert data, which greatly improves flexibility. Here is a simple example to illustrate t ...
Posted by gogul on Wed, 26 Jun 2019 11:42:45 -0700
Too many Spring MVC configurations? Try Spring Boot
Spring MVC believes that you are no longer unfamiliar, you may have a disgusting feeling about Spring's various XML configurations. Spring's official Spring boot has been published for a long time. Spring boot is a lightweight framework of "convention is better than configuration". Spring boot first solves all kinds of tedious XML con ...
Posted by mclamais on Tue, 25 Jun 2019 17:06:13 -0700
[MyBatis Source Code Analysis] Processing flow of insert method, update method and delete method (next part)
New Statement Handler Analysis of Configuration
SimpleExecutor's doUpdate method has been analyzed above:
1 public int doUpdate(MappedStatement ms, Object parameter) throws SQLException {
2 Statement stmt = null;
3 try {
4 Configuration configuration = ms.getConfiguration();
5 StatementHandler handler = configuration.n ...
Posted by xylex on Mon, 24 Jun 2019 13:16:40 -0700
Spring AOP IV: Dynamic Data Source Switching Using AOP
Brief Introduction and Dependence
The premise of the project is to install MySQL database, and establish two databases, one is master and the other is slave, and both databases have a user table. The table export statement is as follows:
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` ...
Posted by Shamrox on Mon, 17 Jun 2019 14:24:26 -0700
Mybatis Interceptor
Page Helper is used to paginate with mybatis and Page Interceptor is used to understand the interceptor of mybatis. Mybatis version is 3.4.6, and Mybatis Helper version is 5.1.3.
1,PageInterceptor
Start with the previous code, List-1 as follows:
List-1
@Test
public void testPage() {
PageHelper.startPage(2, 3);
List<Person ...
Posted by RunningUtes on Sat, 15 Jun 2019 13:31:05 -0700
Mybatis Second [CRUD, Paging]
Complete CRUD operation
In the previous article, we had a brief idea of how Mybatis works and how it works. This time, we used Mybatis to complete the CRUD, reinforcing Mybatis development steps and some details
Structure between Package and Class
Increase Students
configuration file
<?xml version="1.0" encoding="UTF-8"?>
< ...
Posted by jmoreno on Tue, 11 Jun 2019 10:11:54 -0700
Spring Dynamic Data Source + Mybatis Interceptor for Database Read-Write Separation
In the project encountered a need to do read-write separation scenario.
For old projects, to minimize code intrusion and achieve read-write separation at the bottom is crashing.
There are two main points in the technology used:
spring dynamic data source
mybatis interceptor
spring dynamic data source
In the case of multiple data sources, spri ...
Posted by thatsme on Sat, 08 Jun 2019 16:38:19 -0700