mybatis takes notes
mybatis integration springboot
Guide Pack
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql ...
Added by merkinmuffley on Mon, 06 Jan 2020 19:01:03 +0200
Spring Boot integrates Mybatis (1)
New spring boot project, dependent
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc&l ...
Added by trexx on Fri, 03 Jan 2020 23:44:44 +0200
springboot -- multiple data sources
This paper mainly introduces how to configure two data sources (mysql and oracle) in a spring boot project;
1. Import related dependence
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<s ...
Added by DjNaF on Sun, 29 Dec 2019 19:42:04 +0200
Spring boot reading configuration files (multiple yml s)
When learning spring boot (in this case, when integrating mybatis+druid), because there are too many configurations written in a single yml configuration file, it is obviously redundant, so it is configured separately.
However, when loading the druid database configuration information, it is found that the relevant parameters cannot be read (it ...
Added by windjohn on Sun, 15 Dec 2019 23:10:18 +0200
mybatis uses for update to lock data at row level
The usage scenario of for update has been introduced in Spring Date JPA for update. For more information, see the blog: https://blog.csdn.net/zc_ad/article/details/83578487 , we will introduce the usage scenario in mybatis here. Mybatis plus is used. Some basic tutorials have been done before. Address: https://blog.csdn.net/zc_ ...
Added by darktimesrpg on Thu, 12 Dec 2019 18:40:18 +0200
SSM + VUE realize simple CRUD
I. project analysis
1, demand
(1) using ssm + vue to implement a crud (database addition, deletion, modification and query).(2) front and back ends are separated, front page display + background management.
2. Technical points
(1) basic framework: SSM (Spring, Spring MVC, Mybatis)(2) database: Mysql(3) front end: UI frame iView + vue(4) proje ...
Added by ErikTheViking on Thu, 12 Dec 2019 11:39:06 +0200
Build Mybatis framework for idea maven project
Preparatory work:
1. Create a database
2. Create a new user table. The table fields include id, username, birthday, sex and address
3. Download and unzip the maven installation package
New maven project:
1,File-new-Project
2. Select maven and click next
3. GroupId generally fills in the company domain name and writes it backward ...
Added by jawinn on Mon, 09 Dec 2019 23:48:54 +0200
Mybatis plus code generation
Previously, Maven generator was used to generate code. There was a problem in the configuration file from single module to multi module,
Use mybatis plus to generate code automatically instead.
Code cloud address: https://gitee.com/baomidou/mybatis-plus
github Address: https://github.com/baomidou/mybatis-plus
rely on
<dependency>
...
Added by jennatar on Mon, 09 Dec 2019 02:47:50 +0200
Responsibility chain mode of design mode
The responsibility chain mode we usually encounter mainly includes the following scenarios:
Filter in servlet
Filter in zuul
Filter in dubbo
Plugin in mybatis
Here we will only explain the implementation of Filter, mainly to understand the responsibility chain mode.
Filter in Servlet
Related instructions
There are two roles for a filter in a ...
Added by mbdonner on Sun, 08 Dec 2019 23:55:34 +0200
Dry goods, record the troubleshooting process of frequent fgc caused by Metaspace
Recently, a machine on the line gave an alarm after running for more than 10 days, and fgc frequently appeared. After cutting off the traffic, it took the application heapdump file from the operation and maintenance side. At the beginning of fgc, I went to the container platform to check the gc logs, which are as follows:
It can be seen from ...
Added by noisenet on Sun, 08 Dec 2019 20:51:27 +0200