Spring cloud learning -- Spring Cloud OpenFeign service call

1. Introduction 1.1 general Feign is a declarative web service client. It makes writing web service clients easier. To use Feign create an interface and annotate it. It has pluggable annotation support including Feign annotations and JAX-RS annotations. Feign also supports pluggable encoders and decoders. Spring Cloud adds support for Spring M ...

Posted by Someone789 on Fri, 20 May 2022 21:15:35 +0300

To understand the Volatile keyword, in fact, it is enough to read this article, which is very detailed

foreword volatile is a lightweight synchronization mechanism provided by the Java virtual machine. What is the role of the volatile keyword? Two functions: 1. Ensure that the shared variable modified by volatile is visible to the total number of threads, that is, when a thread modifies the value of a shared variable modified by volatile, the ne ...

Posted by c4onastick on Fri, 20 May 2022 19:43:48 +0300

Improve Spring Boot REST API error handling

introduction Spring Boot provides an excellent exception handling mechanism. The default implementation of ErrorController is good at catching and handling exceptions. In addition, you can also implement @ExceptionHandler yourself to catch and handle specific exceptions. However, there is room for improvement here: Even if a custom @Exceptio ...

Posted by MattWeet on Fri, 20 May 2022 18:31:37 +0300

Eureka source code analysis Part 2 - cluster synchronization and service elimination

Eureka source code analysis Part 2 Cluster synchronization How to say cluster synchronization? I think before looking at the source code, we must learn to think about when cluster synchronization will be executed? Once the cluster is synchronized, it makes sense that we must have modified the cluster. When did we modify the cluster, such as ser ...

Posted by adelinewss on Fri, 20 May 2022 06:25:01 +0300

Spring framework Foundation

1,Spring 1.1 INTRODUCTION Spring: Spring - > brings spring to the software industry In 2002, the prototype of Spring framework, interface21 framework, was launched for the first time Spring framework is based on interface21 framework. After redesign and constantly enriching its connotation, it released the official version of 1.0 on Mar ...

Posted by Owe Blomqvist on Fri, 20 May 2022 03:52:39 +0300

SpringBoot startup process: create Environment

Environment composition First of all, Environment is an interface provided by Spring 3.1. It is an abstraction of the environment of the currently running application, let's take a look at its composition. First look at the uml class diagram: Environment consists of two parts 1)profiles The Chinese literal translation of profile means "ov ...

Posted by kingleo on Thu, 19 May 2022 09:39:09 +0300

How to reuse code gracefully with JDK and Spring?

preface Template, as the name suggests, is a fixed and standardized thing. Template method pattern is a behavior design pattern. It defines an algorithm framework in superclass, allowing subclasses to rewrite specific steps of the algorithm without modifying the structure. Scene problem Suppose we are masters of a beverage shop, we need at leas ...

Posted by thekidscareya on Wed, 18 May 2022 14:59:35 +0300

When calling Dubbo service for file upload, com.com appears alibaba. dubbo. rpc. RpcException: Failed to invoke the method

Error problem display This problem bothered me all day. I don't know why. Fortunately, there are big guys on the Internet. The reference blog is at the bottom. Problem solving When dubbo is used to transfer MultipartFile files, an invoke method error will be reported because dubbo cannot transfer this object across the system. Hessian can be ...

Posted by willpower on Wed, 18 May 2022 11:38:29 +0300

spring cache - (CACHE penetration, cache breakdown, cache avalanche, hot data)

Note: This article is a little long, so I suggest you download the source code to learn. (please collect if necessary! Please state the source of reprint, thank you!) Code download: https://gitee.com/hong99/spring/issues/I1N1DF background Following the above< spring cache - distributed cache>; About jmeter configuration jmeter is an ...

Posted by jahwobbler on Wed, 18 May 2022 08:43:34 +0300

Spring IOC -- configuring beans based on annotations

Spring IOC -- configuring beans based on annotations 1. Basic use 1. Description ● basic introduction Beans are configured based on annotations, mainly components in project development, such as Controller, Service, and Dao ● the forms of Component annotation are: @Component indicates that the current annotation identifies a component @ ...

Posted by echion on Tue, 17 May 2022 23:32:07 +0300