Spring Boot is a new framework provided by the Pivotal team, which is designed to simplify the initial construction and development process of new spring applications. It mainly advocates the elimination of configuration and the realization of zero configuration.
So, how to create a spring boot project in idea?
1, Create the Module under the ...
Posted on Fri, 01 May 2020 19:09:08 -0400 by anthony522
The separation of reading and writing and load balancing of MySQL database are generally realized by the third-party software. It can also be implemented through MySQL driver, such as com.mysql.jdbc.ReplicationDriver.
Multi host connection configuration
1. Primary / secondary configuration 2. Load connection configuration 3. Primar ...
Posted on Fri, 01 May 2020 17:51:18 -0400 by waterox
General introduction of the project
Case: the realization of commodity browsing record
Model 1 (Jsp+Javabean) implementation
Implement DBHelper class
Create entity class
Create business logic class (DAO)
Create page layer
DBHelper class design
First copy the package of the drive rack to the lib f ...
Posted on Fri, 01 May 2020 16:23:49 -0400 by cool-palace-ceo
The problem of inserting data into mysql database to display garbled code
When you are doing a java web project, sometimes you will encounter the problem of "random code"? "When you add a database to the database. The main solutions to this problem are as follows:
First: make sure the character set fi ...
Posted on Fri, 01 May 2020 14:11:40 -0400 by Firestorm3d
1, Scheduled backup of database
Mysql backup instructions:
1. Specify database:
mysqldump -h localhost -uroot -proot tuser>d:\user_2017-12-25_15-42-10.sql
tuser: database name
User? 2017-12-25? 15-42-10.sql: filename
2. Specify multiple tables in the database:
mysqldump -h localhost -uroot -proot --databases tuser - ...
Posted on Fri, 01 May 2020 13:28:44 -0400 by DjMikeWatt
1. if statement:
drop function if exists hello;
create function hello(a int) returns varchar (255)
declare x varchar(255) default ' x ';
select `name` into x from gl_dept where id = a;
-- if start
if x = 'Taobao online shop 2' THEN set x = '2';
elseif x = 'Taobao online shop 3' THEN set x = ...
Posted on Fri, 01 May 2020 11:58:22 -0400 by ericm
Analyzing the cost of SQL execution is an important way to optimize SQL. MySQL can record the resource cost of SQL statements, such as IO, context switch, CPU, Memory, etc. by setting the profiling parameter
Viewing the profiling system variable
mysql> show variables like '%profil%';
| Variable_name ...
Posted on Fri, 01 May 2020 11:08:47 -0400 by Millar
MySql provides a simple read-write separation method - replication. First look at the specific demo
public class Conn ...
Posted on Fri, 01 May 2020 08:52:56 -0400 by ik
DBUtils is a module of Python used to implement the database connection pool.
There are three modes of connection pooling:
The first mode:
Its disadvantage: each request repeatedly creates the database link, and the number of links is too many
from flask import Flask
from db import POOL
app = Flask(__name__)
Posted on Fri, 01 May 2020 06:53:29 -0400 by kind
1, Create database
Create the database needed by the project in advance through the command line tool
Note: remote login permission is required for database
#1. Log in to the database:
mysql -uusername -p
#2. Create a new login user:
create user newname identified by 'password';
#3. Remote login authorizati ...
Posted on Fri, 01 May 2020 06:46:12 -0400 by lucasmontan