A preliminary study of sub database and sub table
This article comes from: Daniel lin07's blog "preliminary analysis of sub database and sub table"
Preface
Sub database and sub table is a very common optimization work in enterprise development data storage, but it has not been carefully understood before. Until recently, I contacted a Spark table to synchronize tens of millions of ...
Posted by Mehdi on Mon, 28 Oct 2019 07:30:03 +0100
Notes on the way to security: JDBC's defense against SQL injection
0x00 Preface
This article records my way of learning, directly into the body.
0x01 text
Why does SQL injection occur? For me, it will be summed up as one sentence: "the SQL statement executed by dynamic splicing contains untrusted data."
What is dynamic splicing? Look at the following SQL ...
Posted by cgf2000 on Sun, 27 Oct 2019 03:06:19 +0100
Springboot MySQL template multi data source loading
qq communication group: 812321371
Wechat communication group: mercy Yao
brief introduction
mysql multi data source operation is often used in java projects. It is very convenient to use the original one in combination with spring boot.
However, you need to configure multiple data source configurations.
In microservices, the configuration of d ...
Posted by mj_23 on Sun, 27 Oct 2019 02:45:40 +0100
Spring Cloud OAuth2 for user authentication and single sign on
The article is long, recommend, recommend forwarding, suggest collecting, suggest paying attention to the public account.
There are four authorization modes in OAuth 2, namely authorization code mode, implicit mode, resource owner password credentials and client credentials. For details, please refer to this chapter. (http://www.ruanyifeng.co ...
Posted by TPerez on Wed, 23 Oct 2019 04:39:12 +0200
Spring transaction best practices
Conclusion:
1. Don't use @ Transaction (PS: if you use it, it's better to add it to the method of service layer instead of dao layer and Controller layer) for spring transactions. There will be some situations that cause Transaction rollback failure.
2. It is better to use code to realize transaction management
3. Do not perform RPC, HTTP re ...
Posted by LAX on Wed, 16 Oct 2019 23:38:29 +0200
XMLConfigBuilder Parsing Configuration File Started by MyBatis
Preface
XMLConfigBuilder is one of the subclasses of BaseBuilder, which parses MyBatis's XML and related configurations and saves them in Configuration. In this paper, the analytic process is analyzed according to the execution order, and the analytic principle of common configuration is mastered.
<!-- more -->
Use
Calling XML ConfigBu ...
Posted by shibobo12 on Mon, 14 Oct 2019 07:17:50 +0200
JDBC Quick Start, idea Edition
JDBC: Java DateBase Connectivity
Essence: JDBC is an official set of specifications, interfaces for connecting database operations. The code that actually runs is the code of the implementation class in the jar package provided by the database vendor.
Example:
1. Importing jar packages
Create a folder n ...
Posted by joe__ on Mon, 07 Oct 2019 10:34:28 +0200
Spring configures multiple data sources
Spring configures multiple data sources
configuration file
The first configuration class
The second configuration class
Catalog display
Explanatory notes
configuration file
spring:
datasource:
master:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql:
username:
...
Posted by hightechredneck on Sun, 06 Oct 2019 22:39:39 +0200
jdbcTemplate executes sql to get the collection of objects
In a project, you may encounter that the project architecture is hibernate, but some queries are still used to sql statements, or some queries are more simple and flexible with sql statements. At this point we can inject jdbcTemplate.
1. Configuration and injection of jdbctemplate in non-spring boot projectsConfiguration: Register beans in spri ...
Posted by jonoc33 on Sat, 05 Oct 2019 19:22:01 +0200
JDBC Connection Pool Technology and Druid
JDBC Connection Pool Technology and Druid
Because database connection is a kind of resource, it must be created before use, and this process has time and space overhead. If the connection is created every time when database access is executed, and the connection is closed after use, this process is ...
Posted by D1proball on Sat, 05 Oct 2019 06:22:53 +0200