Record the troubleshooting of an online springcloud feign request service timeout exception

Due to the recent surge in online orders, the third party reported that some work order businesses failed to query and process. After investigation, the current system failed to call the downstream system through FeignClient (the exception code is posted below). Caused by: feign.RetryableException: Read timed out executing POST http://xxxx ...

Posted by faza on Thu, 13 Jan 2022 07:36:24 +0100

Spring cloud application startup process analysis

  spring cloud must be familiar to everyone. It provides developers with tools to quickly build some common patterns in distributed systems, such as configuration management, service discovery, circuit breaker and load balancing. As the saying goes, if you want to be good at something, you must first use your tools. Today, let's disassembl ...

Posted by neuromancer on Wed, 12 Jan 2022 13:08:13 +0100

SpringBoot custom starter - simple version

1. Description I had a tentative interview with a company before. One of the questions was: have you ever written a SpringBoot custom starter Since I have read the source code of Spring before, is this still a problem? Although I haven't written it, I explained the principle again. Take the time to write a custom starter and an enhanced v ...

Posted by mmtalon on Wed, 12 Jan 2022 11:35:14 +0100

Spring boot 2 unit test using JUnit 5

catalogue 1, JUnit 5 changes 1. Introduction 2. Use 2, JUnit 5 common annotations 1. The notes of JUnit 5 and JUnit 4 are changed 2.@DisplayName  3.@BeforeEach,@AfterEach,@BeforeAll,@AfterAll 4.@Disabled 5.@Timeout 6.@SpringBootTest 7.@RepeatedTest 3, Assert 1. Introduction 2. Simple assertion 3. Array assertion 4. Combination a ...

Posted by beachdaze on Tue, 11 Jan 2022 17:42:52 +0100

Are you still returning ApiResult? ✋ duck: No, let's look at the best practices for API error handling ✔️

Share Java NET, Javascript, efficiency, software engineering, programming language and other technical knowledge.This article GitHub TechShare Included, no advertising, Just For Fun.Why did you write this article?I believe many Java developers have used objects like ApiResult to wrap Api return types in projects, which is better than not wrappi ...

Posted by Koobi on Tue, 11 Jan 2022 03:47:15 +0100

Sling ThreadLocal and talk about why FastThreadLocal can be so fast?

1 Introduction background and principle of fastthreadlocal Since jdk already has a ThreadLocal, why should netty create a FastThreadLocal? Where is FastThreadLocal? This needs to start with jdk ThreadLocal itself. As shown below: In java threads, each thread has a ThreadLocalMap instance variable (if ThreadLocal is not used, this Map will ...

Posted by Nacota on Tue, 11 Jan 2022 02:36:18 +0100

springboot learning [version 2.6.2] error handling, Web native component injection day4-3

SpringBoot error handling By default, Spring Boot provides a / error mapping to handle all errors, and will be registered as a global error page in the servlet container json will be generated on the machine client The browser client will generate the whitelabel view They all contain error messages use Error handling is so well packaged ...

Posted by sharyn on Mon, 10 Jan 2022 17:27:38 +0100

Spring Boot uses Swagger3 to generate API interface documents

preface In the previous article, we talked about how to use Spring Boot to integrate Swagger2. The details can be summarized as follows: Spring Boot integrates Swagger2 to build powerful API documents . But in fact, the mainstream 2.9.2 of Swagger2 has not been updated for a long time since it was released in 2018, and Swagger3 was finally re ...

Posted by Kaizard on Mon, 10 Jan 2022 11:53:07 +0100

Spring boot implements interface equal power verification

Generally speaking, interface equipower means that only one request is successful when multiple requests are initiated at the same time; Its purpose is to prevent multiple submission, repeated data warehousing, form verification, network delay, repeated submission and other problems. The mainstream implementation scheme is as follows: 1. Uniq ...

Posted by rpieszak on Mon, 10 Jan 2022 06:23:10 +0100

spring source code refresh Part 2

spring source code refresh Part 2Hello, I'm a classmate of programmer TianThe previous article gave an overall interpretation of the spring core startup method refresh, but only in general. Next, a systematic article will be published to deeply interpret the source code of each method.For the first article, see Method overview of spring source ...

Posted by Crimpage on Mon, 10 Jan 2022 06:20:02 +0100