An implementation of read-write separation of springboot mybatis

First of all, consider using cache for processing. If the cache is not enough, then use read-write separation for implementation application.yml configures two data sources #Default usage configuration spring: profiles: active: dev --- #Development and configuration spring: profiles: dev datasource: master: jdbc-url: jdbc: ...

Posted by Jason_London on Fri, 08 Nov 2019 19:35:17 +0100

springboot2.1.5 + mybatis to configure multiple data sources

1. Startup is the way to create bean s pom.xml <dependency> <groupId>com.alibaba</groupId> <artifactId>druid-spring-boot-starter</artifactId> <version>1.1.10</version> </dependency> <!-- maven Not in the warehouse oracle Database driver, here jar Put it under the project for i ...

Posted by partypete on Mon, 04 Nov 2019 16:37:20 +0100

Positioning process of lock not released due to OOM (in combination with Arthas)

This paper is based on Spring Cloud Fincheley SR4, Arthas 3.1.4 Recently, it is found that the service returns slowly, and feign's fallback is triggered. Check the log and find that the retry is triggered. What triggered the retry is found through the exception stack: Caused by: feign.RetryableException: connect timed out executing GET http:/ ...

Posted by ArneR on Thu, 31 Oct 2019 01:54:50 +0100

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

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

Configuration of Data Connection Pool in SpringBook (tomcat,HikariCP,dbcp2,druid)

Configuration of Data Connection Pool in SpringBook (tomcat,HikariCP,dbcp2,druid) Articles Catalogue Configuration of Data Connection Pool in SpringBook (tomcat,HikariCP,dbcp2,druid) 1. Four connection pools supported in spring boot 2. Configur ...

Posted by moltenice on Mon, 26 Aug 2019 14:04:38 +0200

SpringBoot Two Ways to Simply Integrate Mybatis

rely on Be careful The database connection pool is used here, the Druid is used here, and the Druid is used here is com.alibaba.druid-spring-boot-starter. The starter is provided by a third party. The names of MyBatis and Druid depend on are different from those of other libraries, but the mysql it supp ...

Posted by Good2CU on Mon, 12 Aug 2019 10:29:14 +0200

What is the most elegant way to switch web project data sources?

As business changes/requirements change, Java EE applications will be forced to connect multiple data sources for business processing. How to dynamically switch data sources in the most elegant/concise way without affecting the original project structure? In this paper, the dynamic switching practice after adding data sources once is taken as ...

Posted by swathin2 on Mon, 03 Jun 2019 23:39:59 +0200

Brainless operation: Eclipse + Maven + jFinal + MariaDB environment construction

I. Development Environment 1. windows 7 Enterprise Edition 2,Eclipse IDE for Enterprise Java Developers  Version: 2019-03 (4.11.0) 3,JDK 1.8 4,Maven 3.5.2 5,MariaDB 6,Tomcat 8.5 II. Basic Configuration 1. The settings of Maven in Eclipse are as follows 2. The database uses the default test library to create table categories 1 CREA ...

Posted by gat on Sat, 11 May 2019 13:30:00 +0200