Case: user login
User login case requirements:
1. Write two input boxes of login.html login page username & password
2. use the Druid database connection pool technology to operate the user table in the mysql and day14 databases
3. Using JdbcTemplate technology to encapsulate JDBC
4. Log in succ ...
Posted on Tue, 11 Feb 2020 08:50:12 -0800 by Supernovas
3. Online learning interface3.1 demand analysisAccording to the business process below, this chapter completes the front-end learning page to request the learning service to obtain the course video address, and automatically plays the video. 3.2 build development environment3.2.1 create databaseCreat ...
Posted on Fri, 07 Feb 2020 07:37:38 -0800 by if
Why use a database connection pool
Do not use database connection pools: For sites with high concurrency, this can cause the following problems:
Every web request establishes a database connection, reusing system resources in the same steps
Unable to control the number of connection objects created, sy ...
Posted on Sun, 26 Jan 2020 17:23:07 -0800 by heepofajeep
There are several problems
1) The existence of hard coding (username and password, url and classnameDriver) will be changed at any time
2) Just load the class file once, and load the file every time
3) The connection object needs to be created every time it queries, which is a waste of resources
4) Close resource code is lo ...
Posted on Sun, 05 Jan 2020 21:41:27 -0800 by badboy1245
Master and slave data source configuration
Data source configuration of sub database and sub table
Using dynamic data source and AOP to realize sub database
1. Configure multiple data sources in the application.yml file
date-format: yyyy-MM-dd HH:mm:ss
Posted on Thu, 19 Dec 2019 07:17:53 -0800 by my800stuff
I. technical parameters:
Database connection pool: druid
Project pom file:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Posted on Mon, 02 Dec 2019 20:29:56 -0800 by DaPrince
Druid connection pool
The druid connection pool, which is open-source by Alibaba, is the database connection pool with the most outstanding comprehensive strength at present, and it also provides the function of monitoring logs, which can analyze the execution of SQL.
Introducing druid connection pool
Add to pom.xml
Posted on Tue, 26 Nov 2019 06:25:38 -0800 by Poofman
Recently, I was writing a business about collage travel, which has a logical implementation: a collage Activity table Activity corresponds to multiple Travel travel tables, a travelling travel table stores the List <TravelSchedulingVO> from the front-end in segments, and a Travel table stores each piece of data ...
Posted on Wed, 20 Nov 2019 21:54:30 -0800 by trystan
1. Principle of multi data switching: the core of multi data source dynamic switching is that the bottom layer of spring provides AbstractRoutingDataSource class for data source routing. We mainly inherit this class and implement the methods in it.
The main implementation method is: determineCurrentLookupKey(), which only needs to return the ...
Posted on Sun, 10 Nov 2019 09:02:12 -0800 by gauravupadhyaya
Multiple data source configuration is also a common development requirement. There are solutions for this in Spring and SpringBoot, but generally, if there is a need for multiple data sources, I would recommend that you prefer the distributed database middleware MyCat to solve the problem. A small partner asked questions on my knowledge planet ...
Posted on Thu, 07 Nov 2019 19:13:55 -0800 by LinuxForce