Spring Boot Master-Slave Read-Write Separation

It encapsulates a read-write separated Starter, which can configure any number of data sources and use Hikari connection pool (other connection pools are not supported for the time being). GitHub: rw-separate-spring-boot-starter The code has been uploaded to the Maven Central Warehouse and can be used directly: <dependency> <groupI ...

Posted on Sat, 05 Oct 2019 08:20:25 -0700 by simonp

Problems encountered by Spring Boot MyBatis using Redis as a secondary cache

When Spring Boot MyBatis uses Redis as a secondary cache, it encounters a weird problem, which is always reported when MyBatis retrieves the cache from Redis and deserializes it. org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.ClassCastException: hello.entity.User cannot be cast to h ...

Posted on Sat, 05 Oct 2019 01:39:39 -0700 by mellowman

SpringBoot 1. * or 2. * Integrated prometheus configuration

1. First of all, we need to introduce dependencies: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> <version>1.5.4.RELEASE</version> </dependency> <dependency> <gro ...

Posted on Fri, 04 Oct 2019 23:37:13 -0700 by Pedestrian

Spring security Note 4/4: Customizing Success and Failure

Customize Success and Failure Or on the basis of the previous examples, the authentication successfully jumped the page and changed to the authentication successfully returned data. Implementation steps 1. Copy the source code of the previous example Rename package name case 3 to case 4 Rename Case3Application.java to Case4Application.java 2. ...

Posted on Fri, 04 Oct 2019 19:24:16 -0700 by rhiza

Eureka Actual Warfare-1 [Eureka Server Online Expansion]

1. Preparations PS: To be lazy, the public dependency configuration that each pom file relies on is listed below: <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.3.RELEASE</version> <relativePath/> </par ...

Posted on Fri, 04 Oct 2019 11:48:17 -0700 by achild

Chapter 1 spring Context Loader Listener

Preface Environment building github Download Version 4.10.3 jdk 1.8 maven ContextLoaderListener Constructing method of org. spring framework. web. context. ContextLoaderListener public ContextLoaderListener(WebApplicationContext context) { super(context); } org.springframework.web.context.WebApplica ...

Posted on Fri, 04 Oct 2019 10:55:12 -0700 by damienwc

SpringBoot~File Upload

1. File upload SpringBoot simplifies file upload, which makes file upload very convenient. Here is how to write single file upload and multi-file upload when the front and back ends are separated. Dependency Addition (pom.xml) (Basic Dependency) <dependency> <groupId>org.springframework.boot</groupId> <artifactId& ...

Posted on Fri, 04 Oct 2019 09:55:06 -0700 by inkfish

java project tuning based on spring boot

1. springboot project optimization with embedded server tuning 1. springboot project optimization with embedded server tuning 1. Spring boot abandons tomcat as embedded server and uses undertow instead maven Add to pom The documents are as follows: <dependency> <groupId>o ...

Posted on Fri, 04 Oct 2019 05:25:11 -0700 by cableuser

Springboot 2.1.0, Swagger simple use

One) swagger is a mature interface-related plug-in, which can be used in almost all projects. The introduction of swagger jar in pom.xml is the latest version of swagger <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2 ...

Posted on Thu, 03 Oct 2019 23:38:24 -0700 by Intaglio5

Chapter 5 Lifecycle Processor (Life Cycle)

Preface Lifecycle Processor is responsible for managing the Application Context life cycle. It's a very important part of Application Context, and there are very few places that need it. Lifecycle Lifecycle interface, no obvious call. So Lifecycle is basically useless. public interface Lifecycle { void start(); void stop(); boolean i ...

Posted on Thu, 03 Oct 2019 15:14:47 -0700 by gdhanasekar