SpringBoot Series Tutorial Mybatis+Annotations Integration
SpringBoot Series Tutorial Mybatis+Annotations Integration
The previous blog post described SpringBoot's process of integrating mybatis, but the way xml works always feels a bit frustrating; this article introduces a noxml usage posture that supports CURD purely with annotations
<!-- more -->
I. Environment
This article uses SpringBoot ...
Added by shiny_spoon on Tue, 07 Jan 2020 05:47:25 +0200
MySQL query shows continuous results
#The problem of displaying only n consecutive rows for query results in mysql#
A problem encountered on the collar button: finding the display of 3 consecutive lines of results that meet the conditions
X city built a new stadium, each day many people visit it and the stats are saved as these columns: id, date, people;
Please write a query to d ...
Added by greip on Tue, 07 Jan 2020 02:45:12 +0200
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
Grant ** all ** database permissions
I created a database, such as'mydb'.
CREATE DATABASE mydb CHARACTER SET utf8 COLLATE utf8_bin;
CREATE USER 'myuser'@'%' IDENTIFIED BY PASSWORD '*HASH';
GRANT ALL ON mydb.* TO 'myuser'@'%';
GRANT ALL ON mydb TO 'myuser'@'%';
GRANT CREATE ON mydb TO 'myuser'@'%';
FLUSH PRIVILEGES;
Now I can log in to the database from anywhere, but I can't ...
Added by doforumda on Sun, 05 Jan 2020 23:38:02 +0200
Create a database connection pool of your own
thinking
1. My idea is to save JDBC connection thread with a linked list. When a connection calls the close method, it also proves that the life of the connection thread is ending, so the connection is recycled through the reflection agent. Add a new connection thread at.
2. When we get the connection to the thread pool, ge ...
Added by ttmt on Sun, 05 Jan 2020 22:33:27 +0200
Java backup mysql database
1. Install mysql database, and configure the mysql installation directory bin directory to the system environment variable
2, command
mysqldump -h (IP) - p (port number) - u (user name) - p (password) - default character set = utf8 database name > where to back up to the local disk
Column: mysqldump - h192.168.1.10 - p330 ...
Added by puckeye on Sun, 05 Jan 2020 18:32:39 +0200
MySQL table defragmentation
MySQL table defragmentation
1. Calculate fragment size
2. Defragment
2.1 use the alter table table_name engine = innodb command to organize.
2.2 the PT online schema change tool can also be used to organize table structure and collect fragments online.
2.3 use the optimize table command to defragment.
1. Calculate fragment size
To defra ...
Added by fert on Sun, 05 Jan 2020 02:11:37 +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
C language operation mysql
After MySQL is installed, an include directory and a lib directory are generated under mysql. The include directory holds the header file, and the lib is the dynamic link library. Copy mysql.h under include / to / usr/include, and copy libmysqlclient.so and libmysqlclient.so.18 under lib / to / usr/lib64. The writing program ne ...
Added by jana on Thu, 02 Jan 2020 19:37:58 +0200
Operating mysql database in python
1. Connect to mysql database
To connect to mysql in python, you need to import the pymysql module first
import pymysql
# Connect to mysql database---
# User name, password, host name, port number
# host = None, con specifies the host name, ip address, 127.0.0.1 and localhost represents the host
# user = None, specify user na ...
Added by ace21 on Thu, 02 Jan 2020 16:10:19 +0200