I wrote an article about MyBatis Click the link to enter the basic CRUD of low version comparison
However, it is not necessary to write dao layer and entity layer code in actual development, mainly using the shelf package provided by MyBatis
Here is the whole process of using reverse engineering
2, Demo and code
① Create a ja ...
Posted on Fri, 01 May 2020 00:14:19 -0700 by geetakhurana
When testing mrr, we encountered an interesting problem
| bai_test | CREATE TABLE `bai_test` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`num` int(11) DEFAULT NULL,
`name` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11756 DEFAULT CHARSET=utf8 |
mysql> explain select * from bai_ ...
Posted on Thu, 30 Apr 2020 21:52:35 -0700 by theoph
Spring boot is a service development framework that integrates service publishing, database management and log management. It is also an all-around helper for microservice development. This chapter describes how to use spring boot to access MySQL database.
2, Build basic environment
1. Install Maven (a lot of guidance docume ...
Posted on Thu, 30 Apr 2020 20:09:29 -0700 by johnh
1. Try not to use select * to query SQL, but select specific fields.
select * from employee;
Only take the required fields, save resources and reduce network overhead.
When select * is used for query, it is likely that the overwrite index will not be used, r ...
Posted on Thu, 30 Apr 2020 19:55:20 -0700 by adi
It's inevitable to deal with the database in java development, so here's an article about connecting mysql with jdbc, The main contents include:
1. java connect mysql
2. java queries mysql data.
3. java inserts mysql data.
4. java updates mysql data.
5. java deletes mysql data.
6. java executes mysql stored procedures.
ide: IntelliJ IDEA201 ...
Posted on Thu, 30 Apr 2020 19:11:38 -0700 by Gugel
1, Let's start with self executing functions
1. What is the immediate execution function? That is, anonymous functions
The immediate execution function is
Declare an anonymous function
Call this anonymous function now
2. An example of pop
Click to open a new window. After saving, the page will return without refreshing the data. (click the + ...
Posted on Thu, 30 Apr 2020 15:47:05 -0700 by cybersurfur
In order to prevent the user from using sql statements to inject and attack the database, the sub interface of the Statement interface can be used
java.sql.PreparedStatement extends Statement
This interface represents the object of the precompiled SQL statement, which is precompiled and stored in the PreparedStatement object. You can then use ...
Posted on Thu, 30 Apr 2020 05:14:46 -0700 by Spekta
I. software environment
Oracle Linux 7.1
II. Host settings
Master IP: 10.24.33.186
Slave IP: 10.24.33.188
Three master slave configuration
1. Master configuration
Create a replication user and grant the appropriate permissions:
mysql> create user 'repl'@'10.24.33.188' identified by 'repl';
Query OK, 0 rows affected ( ...
Posted on Wed, 29 Apr 2020 22:57:25 -0700 by joe_C_nice
14. Enterprise Actual Warfare Cases
(1) Use the for loop to create 10 html files in batch in the / oldboy directory, where the file name contains 10 random lowercase letters to reinforce the fixed string 0ldoby.
Idea analysis to generate random numbers:
The core is to create 10 random lower case letters.
echo $RANDOM range is 0-32767
Posted on Wed, 29 Apr 2020 09:37:56 -0700 by kparker
Easycode is a plug-in of idea, which can generate entity,controller,service,dao,mapper directly to the data table. It is simple and powerful without any coding.
1. Installation (EasyCode)
My words here are already loaded.
I suggest you install a plug-in called Lombok.
Lombok It can automatically generate constructor, getter/setter, equals, h ...
Posted on Tue, 28 Apr 2020 21:35:50 -0700 by jwwceo