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
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
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
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
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
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
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
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
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
In addition to caching, Redis can also do many things: distributed locking, flow limiting, idempotency of request processing interface... Too much, too much ~Today, I want to talk with my friends about how to use Redis to deal with interface current limitation. This is also the knowledge point involved in the recent TienChin project. I'll bring ...
Posted by harley1387 on Tue, 17 May 2022 16:48:56 +0300