MyBatis

MyBatis 1. forEach cycle The attributes of   forEach element mainly include item, idnex, collection, open, separator, close. collection: incoming List or Array or self encapsulated Map. item: alias of the element iteration in the collection. idnex: index of element iteration yes in the collection. open: where is followed by what to start ...

Added by mohson on Sat, 07 Dec 2019 20:03:54 +0200

java B2B2C Springcloud multi tenant e-mall system - breaker aggregation monitoring

I. Introduction to Hystrix Turbine There is not much value in looking at the data of a single Hystrix Dashboard. To look at the data of this system's Hystrix Dashboard, you need to use Hystrix Turbine. Hystrix Turbine consolidates the data of each service's Hystrix Dashboard. The use of Hystrix Turbine is very simple. You only need to introduce ...

Added by aleph_x on Wed, 04 Dec 2019 00:44:03 +0200

Learn factory mode from BWM production

Factory mode is widely used, and can be seen everywhere in JDK low-level source code and major mainstream frameworks. Classes usually named after Factory, such as SqlSessionFactory in Mybatis and BeanFactory in Spring, are typical examples of factory mode. 1. Simple Factory Mode 1.1 Concepts Simple factory mode, also known as static factory mod ...

Added by adnan1983 on Tue, 03 Dec 2019 08:12:18 +0200

Spring boot learning note 21 -- JWT implementation of login verification

Today, let's record how to use JWT to implement user login verification. The effect of the implementation is that a token will be returned to the client for subsequent login verification. After login, the client needs to put the token in the requested head, otherwise the returned login fails. Don't talk much and go straight to ...

Added by SZero on Mon, 02 Dec 2019 08:23:26 +0200

SpringBoot 2.0 | SpringBoot + MyBatis Configure Multiple Data Sources

In the traditional monolithic architecture, one system corresponds to one database, but in a distributed system, such as micro-services, each service corresponds to one database. Due to business requirements, sometimes it is necessary to access data from multiple databases in one service. We need to configure multiple data sourc ...

Added by staffanolin on Sun, 01 Dec 2019 21:25:50 +0200

The use of EntityListeners annotation in JPA

Usage scenarios EntityListeners are used in jpa. If you are mybatis, you cannot use them Its significance Tracking the changes of entity attributes provides the status of before saving, after saving, before updating, after updating, before deleting and after deleting. Just like an interceptor, you can rewrite your personalized logic in the inte ...

Added by pbsonawane on Sun, 01 Dec 2019 16:15:25 +0200

One to many and many to one XML configuration details of Mybatis Association query

Generally, dao, bean and XML files are generated automatically in the development process, and rarely write the configuration relationship of XML. Today, record the many to one and one to many situations in the associated query of mybatis. First, there are two tables (Student table and Teacher table). In order to be more understandable, only th ...

Added by PHPQuack on Sun, 01 Dec 2019 09:34:41 +0200

spring boot and mybatis

Simplified configuration and content sublimation of spring boot and spring mvc. How to integrate mybatis in spring boot? Part 1: maven dependency (you can check it when creating the spring boot project) <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId&g ...

Added by harvillo on Thu, 28 Nov 2019 17:55:23 +0200

Mapper series 4: mapper interface extension

Extension refers to adding functions not provided by general Mapper. Give an example: An example of using bulk insert as an extension function in the official document of general Mapper is:   tk.mybatis.Mapper.additional.insert.insertlistmapper < T >   tk.mybatis.mapper.additional.insert.InsertListProvider Let's ...

Added by eraxian on Tue, 19 Nov 2019 21:15:58 +0200

SpringBoot from getting started to giving up, Chapter 4, integrating JDBC Druid Mybatis

SpringBoot from getting started to giving up, Chapter 4 I. springboot integrates JDBC and DRUID 1,POM <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId> </dependency> <dependency> <groupId>mysql</groupId> &l ...

Added by hthighway on Thu, 14 Nov 2019 16:41:21 +0200