PreparedStatement implements operations on database tables

Note: The links below are all based on mysql as an example, @Test is a Junit4 comment for testing, and the tool classes used are described in the previous section Post the table-building statement first for easy follow-up CREATE TABLE `fruit` ( `fruitName` varchar(10) COLLATE utf8_bin DEFAULT NULL COMMENT 'Fruit Name', `id` int(11) NOT N ...

Added by ralph4100 on Wed, 26 Jan 2022 21:23:21 +0200

Preliminary understanding of JDBC

JDBC What is JDBC? It is a common interface (API) for SQL database access and operation independent of a specific database management system. Why provide a fixed interface? A: it is easy to operate and improve efficiency. Different databases can be programmed through this set of interfaces. After layering, programmers only need to program ...

Added by GuiltyGear on Wed, 26 Jan 2022 16:02:00 +0200

Spring Boot learning notes - integrating JDBC

Spring Boot learning Official website: https://spring.io/projects/spring-boot#overview file: https://docs.spring.io/spring-boot/docs/2.2.6.RELEASE/reference/html/ Reference video: [crazy God says Java] the latest tutorial of SpringBoot, IDEA version, is easy to understand_ Beep beep beep_ bilibili Project complete reference code: lexi ...

Added by dacs on Sat, 22 Jan 2022 07:50:34 +0200

Detailed explanation of Spring JdbcTemplate

1. What is Spring JdbcTemplate Spring JdbcTemplate, also known as Spring JDBC module, is mainly responsible for database resource management and error detection to simplify the operation of the database. Spring JdbcTemplate is an object provided in the spring framework. It is a simple encapsulation of the original cumbersome JDBC API object. ...

Added by tekkenlord on Thu, 20 Jan 2022 05:06:28 +0200

Want to learn java JDBC? Come here and I'll teach you hand in hand

Java JDBC learning JDBC (Java DataBase Connectivity) java database connection ● is a Java API for executing SQL statements, which can provide unified access to a variety of relational databases. It is composed of a group of classes and interfaces written in Java language. With JDBC,java developers only need to write a program once to access di ...

Added by cjcdadams on Wed, 19 Jan 2022 16:12:07 +0200

JDBC Learning Journal: database connection pool

7: Database connection pool 7.1 necessity of JDBC database connection pool When developing web programs based on database, the traditional mode basically follows the following steps: Establish database connection in the main program (such as servlet and beans)Perform sql operationsDisconnect database Problems in the development of this m ...

Added by sell-traffic on Wed, 19 Jan 2022 03:46:08 +0200

Build the simplest multi data source with mybatis plus as the framework (different data sources under different packages)

1.1 introducing pom dependency When introducing SpringBoot and SpringCloud versions, pay special attention to their compatibility Reference: https://spring.io/projects/spring-cloud <!--introduce springboot Parent project dependency--> <!--Introduce dependency: It can be omitted version Tag to get some reasonable ...

Added by fred_m on Mon, 17 Jan 2022 02:18:53 +0200

(PreparedStatement, database connection pool, tool class improvement)

1, PreparedStatement 1.1 SQL injection Before sql execution, problems may arise if you splice the sql statement string and the filled data When the user inputs special data with sql statements and splices it with the original sql, the execution results of the sql statements may be inconsistent with the expectations, resulting in program erro ...

Added by Alecdude on Sun, 16 Jan 2022 22:40:15 +0200

jdbc connection pool and jdbc template

I jdbc connection pool The connection between the program and the database is the underlying technology. Each connection is time-consuming, and after it is used up, the connection must be closed to release resources. In fact, it is a waste of time to connect and release repeatedly. Therefore, a connection pool technology is introduced to manag ...

Added by mattnoble on Sat, 15 Jan 2022 15:15:23 +0200

Java JDBC: 2. Get database connection

1. Element 1: Driver interface implementation class 1.1 introduction to Driver interface java. sql. The driver interface is the interface that all JDBC drivers need to implement. This interface is provided for database manufacturers. Different database manufacturers provide different implementations. In the program, you do not need to direc ...

Added by Med on Sat, 15 Jan 2022 14:14:26 +0200