JDBC addition, deletion, modification and query
JDBC programming steps
1, Get link method
1.1 mode 1: use Dirver interface
Driver driver=new com.mysql.jdbc.Driver();
//jdbc:mysql protocol
//localhost:ip address
//3306: default MySQL port number
//test: Database
String url="jdbc:mysql://localhost:3306/test";
//The properties interface is used to read configuration files in the for ...
Posted by buddok on Tue, 04 Jan 2022 17:50:43 +0100
CAS5.3 server configuration, link mysql, custom password encryption, login page, login verification, custom exception, ajax login, etc
catalogue
1. Configuring mysql for cas server 2. cas server custom password encryption method 3. The cas server can customize the theme, that is, the login page, or other pages 4. The cas server adds fields to the form submitted during login 5. cas server custom login verification 6. cas server custom return exception 7. The cas server uses aj ...
Posted by sdlyr8 on Tue, 04 Jan 2022 14:32:06 +0100
Write a network disk yourself?
Author: osmanthus New Year cake, no reprint without permission!
Continuous updating
preface
The project is written in C and C + +. It involves many knowledge points and has not been written yet. It is a good project to expand our horizons! In the future, relevant teaching videos will be placed at the end of the article. Please pay att ...
Posted by kellog on Tue, 04 Jan 2022 08:00:04 +0100
Is database batch insertion so particular?
Recently, many insertBatch codes have been written in new projects. It has been said that batch insertion is much more efficient than circular insertion. This paper will experiment. Is it true?
Test environment:
SpringBoot 2.5
Mysql 8
JDK 8
Docker
First, insert multiple pieces of data. Options:
foreach loop insert
Splicing sql, one execution ...
Posted by steelaz on Tue, 04 Jan 2022 07:16:13 +0100
redis entry to give up - 2
8. Spring boot integrates redis
Import dependency
<!--redis rely on-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
<!-- <version>2.1.6.RELEASE</version>-->
</dependen ...
Posted by ForgotMyPass on Tue, 04 Jan 2022 06:41:51 +0100
Basic addition, deletion, query and modification of Mysql
introduction
All presentations are based on the table student. The student creation statement is as follows:
create table if not exists Student(
id int,
name varchar(20),
math float,
english float,
chinese float
);
I newly added
1. Single row data + full column insertion
insert into Table name values(Corresponding value o ...
Posted by vinoth on Tue, 04 Jan 2022 03:16:36 +0100
SQL injection vulnerability shooting range - sqli labs learning
less-1
Judge injection point
Add in the url according to the prompt? id=1 - note that all the symbols entered here are in English
Of course 2, it's OK. It's just to pass a parameter and output a login result
After we know the successful landing page, we should now try his guess about the closing mode of a piece of code (here are "' ...
Posted by Online Connect on Tue, 04 Jan 2022 02:25:33 +0100
Here comes the MyBatis persistence layer framework
When developing JAVA projects, we need to interact with the database. At the beginning of database programming, we choose JDBC, which is the API for how to interact between the database and JAVA programs, but the steps are cumbersome. Today, we will learn about the latest database framework, MyBatis. It is a semi-automatic persistence layer fra ...
Posted by dsainteclaire on Tue, 04 Jan 2022 00:53:56 +0100
Database connection pool and DBUtils tool
1: DBCP data source DBCP: short for database connection pool, it is the implementation of open source connection pool under Apache organization and the connection pool component used by Tomcat server. When using DBCP data source alone, you need to import two JAR packages in the application, as follows: 1.commons-dbcp.jar package commons-dbcp.j ...
Posted by ahundiak on Mon, 03 Jan 2022 20:29:26 +0100
[Java from zero to architect season ③] [07] MyBatis multi table relationship
Continuous learning & continuous updating
Keep breaking away
Multi table relation
There are two perspectives when thinking about the relationship between the two tables:
Think about table B from table A (see table A as an A)Think about table A from table B (see table B as A b) That is:
Look at table B from an AStart from ...
Posted by duvys on Mon, 03 Jan 2022 19:56:23 +0100