Spring boot + mybatis + Druid + log42 to print sql logs

My version of SpringBoot is: 2.1.10.RELEASE First, add jar package in pom file, and add jar package of log42, druid and mysql <!--log4j2--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter- ...

Posted on Tue, 25 Feb 2020 03:45:02 -0500 by blesseld

Druid of JDBC learning notes

step Import druid-1.0.9.jar package Define profile: It's in the form of properties It can be called any name and placed in any directory driverClassName=com.mysql.cj.jdbc.Driver url=jdbc:mysql://127.0.0.1:3306/test04 username=root password=root # Number of initialization links initialSize=5 # maximu ...

Posted on Wed, 19 Feb 2020 09:24:51 -0500 by Ark3typ3

Java learning notes - Request

Principle of request object and response object The request and response objects are created by the server The request object is the message to get the request, and the response object is the message to set the response request object inheritance architecture:ServletRequest -- Interface Inherit Htt ...

Posted on Mon, 10 Feb 2020 05:13:23 -0500 by gpittingale

Pooling Technology for Java Data Persistence Series

In the last article Java Data Persistence Series JDBC In, we learned that creating a Connection using JDBC executes the corresponding SQL, but creating a Connection consumes a lot of resources, so JDBC is often not used directly in the Java persistence framework, but rather a database connection pool layer on it. Today we will first understand ...

Posted on Mon, 03 Feb 2020 21:32:17 -0500 by RealDrift

springboot integrates multiple data sources

Brief principle: 1) DataSourceEnum lists the key---key of all data sources 2) DataSourceHolder is a thread safe DataSourceEnum container and provides methods to set and get DataSourceEnum from it 3) DynamicDataSource inherits AbstractRoutingDataSource and overrides the method determineCurrentLookupKey(), in which the DataSourceHolder is used to ...

Posted on Wed, 29 Jan 2020 12:27:11 -0500 by markduce

Spring Boot integrates Mybatis

1, Create project Integrate STS with eclipse, create a new spring boot project, and check the following options All the way to next, pom.xml file will help us to configure But we also need to introduce the thmeleaf template engine, and we need to manually add it to the pom.xml file <dependen ...

Posted on Tue, 28 Jan 2020 10:19:41 -0500 by StealthRider

Spring boot integrates druid data source to realize sql monitoring

Spring boot integrates druid data source to realize sql monitoring Import druid dependency Global profile druid configuration class Complete the test Import druid dependency <!-- https://mvnrepository.com/artifact/com.alibaba/druid --> <dependency> <groupId>com.alibaba</ ...

Posted on Sun, 26 Jan 2020 10:15:11 -0500 by Darkmatter5

CRUD operation implemented by DBUtils

Introduction to Apache dbutils Commons dbutils is an open source JDBC tool class library provided by Apache organization. It is a simple encapsulation of JDBC, which helps us simplify CRUD The code. The main API, such as QueryRunner class, simplifies the SQL query. It can complete most of the databas ...

Posted on Sun, 26 Jan 2020 03:41:46 -0500 by CiPH

storm submits topology and references external configuration file

background Since the jar package needs to be published to the storm distributed environment to run, the configuration file must be entered into the jar package every time, so that when the program runs, the configuration file can be found from the classpath. Every time the program is released, the con ...

Posted on Mon, 20 Jan 2020 11:37:30 -0500 by gr8dane

Analysis of the sql parsing source code of Mycat

  the SQL parsing of Mycat is divided into two parts: shallow parsing and deep parsing. The following two parts are explained respectively. The version number of Mycat analyzed in this paper is 1.6.7.4-test-20191226161308. For the specific version number information, please refer to io.Mycat.confi ...

Posted on Sun, 19 Jan 2020 22:09:04 -0500 by elwadhos