jsp+servlet hospital appointment registration system based on javaweb+mysql (java+jdbc+jsp+mysql+ajax)

jsp + servlet hospital appointment registration system based on javaweb + mysql (java + jdbc + jsp + mysql + ajax) Private message Source code acquisition and debugging communication Operating environment Java≥8, MySQL≥5.7, Tomcat≥8 development tools eclipse/idea/myeclipse/sts, etc. can be configured to run Be applicable Course design, major assignments, graduation projects, project exercises, learning demonstrations, […]

,Multiple data sources + Mybatisplus + Sharding JDBC split tables in the same database

Horizontal table sharding is to split the data of the same table into multiple tables according to certain rules in the same database. Multiple data sources use the dynamic-datasource of mybatis-plus. The sharding-jdbc database and table sharding are used. The database connection pool management is alibaba’s druid-spring-boot-starter Tables in the same database Table of Contents […]

sharding-jdbc four sharding strategies

1. Standard sharding strategy (standard) 1. Precise sharding Configuration file spring: shardingsphere: #Enable sql display props: sql: show: true datasource: # Configure data source names: db0,db1 db0: type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://127.0.0.1:3306/sharding_test_0?useUnicode=true & amp;character_set_server=utf8mb4 & amp;useSSL=false & amp;useJDBCCompliantTimezoneShift=true & amp;useLegacyDatetimeCode=false & amp;serverTimezone=Asia/ Shanghai username: root password: root db1: type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://127.0.0.1:3306/sharding_test_1?useUnicode=true […]

MySQL Database-JDBC

Understand JDBC First understand what a database connection driver is Database driver: It is the key to connecting the application and the database. Our program will deal with the database through the database driver! ! ! In order to simplify developers’ (unified database) operations, SUN provides a specification (for Java database operations), commonly known as […]

DbUtils + Druid implements JDBC operations — Attached is BaseDao

Article directory Apache-DBUtils implements CRUD operations 1 Introduction to Apache-DBUtils 2 Usage of main API 2.1 DbUtils 2.2 QueryRunner class 2.3 ResultSetHandler interface and implementation class 3 JDBCUtil tool class writing 3.1 Guide package 3.2 Writing configuration files 3.3 Writing code 4BaseDao written Apache-DBUtils implements CRUD operations 1 Introduction to Apache-DBUtils commons-dbutils is an open […]

dynamic-datasource+shardingsphere-jdbc realizes sub-database and sub-table

Project background On the basis of spring boot and dynamic-datasource realizing the separation of reading and writing of the database, the function of sub-database and table is added. 1. Framework version 1. Key technology stack versions <properties> <java.version>8</java.version> <snakeyaml.version>1.33</snakeyaml.version> </properties> <dependencies> <!– druid connection pool –> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid-spring-boot-starter</artifactId> <version>1.2.20</version> </dependency> <!–dynamic-datasource–> <dependency> <groupId>com.baomidou</groupId> <artifactId>dynamic-datasource-spring-boot-starter</artifactId> […]

JDBC operates on the database

1. Use JDBC to query all data of database table t_user 1.User table Name Data type Primary key Whether it is empty Description ID number is the user number NAME Varchar2(50) username AGE varchar2(5) user age BIRTH date User birthday PWD varchar2(20) No User password import java.sql.Connection; import java.sql.Date; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class JdbcMysqlTest {<!– –> public static […]

JDBC database operation encapsulation class

DB.properties database configuration file driver=com.mysql.cj.jdbc.Driver url=jdbc:mysql:///orcHr user=root password=root JdbcUtils.java JDBC database operation encapsulation class package cn.demo01.utils; import java.io.FileReader; import java.io.IOException; import java.sql.*; import java.util.*; /** * @Author Jiafang Wen * @Date 2023-10-28 12:04 * @Version 1.0 */ public class JdbcUtils<T> {<!– –> private static String driver; private static String url; private static String user; private […]

JDBC and MySql database

1. Environment preparation before system development 1. Download Mysql Download address: https://dev.mysql.com/downloads/mysql/ Unzip the file to local Add a my.ini file and a new data folder under this path Edit the my.ini file Configure environment variables Note that it is the Path to edit the system variable. Run cmd as administrator, or win + r […]