Spring Cloud Micro Service Architecture From Getting Started to Getting Used - Service Gateway Spring Cloud Gateway

In the first two articles, we have preliminarily completed a small micro-service framework, including a service registry, an order service, and an inventory service. Order services can also make inter-service invocations of inventory services through feign.In that article, we will introduce the service gateway Spring Cloud Gateway. Spring Cloud ...

Posted by daddymac on Mon, 23 Mar 2020 10:59:24 -0700

JDK9 New Feature Reactive Stream Responsive Stream

_This article focuses on the JDK9 feature Reactive Stream Responsive Stream, describes what the Reactive Stream is and what the backpressure is, and the interface and two use cases for Reactive Stream provided in JDK9, including how to use Processor. _1.Reactive Stream concept _Reactive Stream is a set of standards introduced by JDK9 and a set ...

Posted by simjay on Fri, 28 Feb 2020 18:03:33 -0800

Webplus - returns a unified custom response object

Preface [TOC] Generally speaking, the status code of http request only indicates whether there is a problem in the request, and cannot indicate where the error is. For example, the user is only a business problem and needs to give a warning, but the status code of http does not indicate a business problem. Therefore, many systems adopt the foll ...

Posted by illzz on Thu, 05 Dec 2019 21:00:41 -0800

Summary of small pits encountered by the spring cloud gateway interceptor

Many friends may encounter the following problems when using spring cloud gateway How to read Post request body in spring cloudgateway private BodyInserter getBodyInserter(ServerWebExchange exchange) { ServerRequest serverRequest = new DefaultServerRequest(exchange); Mono<String> modifiedBody = serverRequest.bodyToMono ...

Posted by Scorptique on Thu, 28 Nov 2019 06:25:34 -0800

Spring Boot: Spring Doc Generates OpenAPI 3.0 Documents

1. Overview The company is currently documenting the project, and documentation is critical to building the REST API.In this article, I will introduce Spring Doc, a tool that simplifies the generation and maintenance of API documents for Spring Boot 1.x and 2.x applications based on the OpenAPI 3 specification. 2. Set up springdoc-openapi If yo ...

Posted by polybiosis on Sun, 24 Nov 2019 17:54:50 -0800

Combining compleblefuture with Sleuth of Spring, combining tool classes with allOf and anyOf

Series Catalog: Thinking and comparison in the application of Spring WebFlux Completabilefuture and Spring's Sleuth combination tool class Some optimization thinking in the process of using anyOf by CommpetableFuture Combining compleblefuture with Sleuth of Spring, combining tool classes with allOf and anyOf The previously implemented complet ...

Posted by phpnewbie81 on Fri, 22 Nov 2019 11:02:07 -0800

Spring Cloud gateway service I

Before we introduced zuul gateway service, today we talk about spring cloud gateway as the parent-child gateway service of spring cloud. Many ideas are based on zuul, which provides a convenient condition to consider zuul's migration to gateway. gateway's core functions are similar to zuul's. But his implementation method is different from zuul ...

Posted by paggard on Mon, 04 Nov 2019 17:07:21 -0800

spring cloud gateway source code parsing

1.gateway versus zuul 1.zuul is based on servlet 2.5 and compatible with servlet 3.0. It uses blocking API and does not support long connections such as websocket. 2.Gateway is based on spring 5, Reactor and spring boot 2. It uses non-blocking API, supports websocket, integrates perfectly with spri ...

Posted by noobyphpchick on Sat, 05 Oct 2019 10:21:41 -0700

11 Points Make Your Spring Boot Start Faster

Preface OpenJDK 11 is used. java --version openjdk 11.0.1 2018-10-16 OpenJDK Runtime Environment 18.9 (build 11.0.1+13) OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode) You can run the benchmark as follows. It may take some time to run, and all the tests will be executed below. ./mvnw clean package (cd benchmarks/; java -jar target ...

Posted by ronniebrown on Thu, 12 Sep 2019 00:20:11 -0700

spring webflux returns application/stream+json

order This paper mainly studies the example of spring webflux returning application/stream+json maven <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-webflux</artifactId> </dependency> controller /** * curl -i localhost:8080/stream * @return ...

Posted by jason_kraft on Thu, 07 Feb 2019 14:18:17 -0800