It's so complete! This is the correct posture of Redis distributed lock! Have you mastered it?

preface In Java, we are familiar with locks. The commonly used locks are synchronized and Lock. In Java Concurrent Programming, we use locks to solve the problem of data inconsistency caused by multiple threads competing for the same shared resource or variable. However, JVM locks can only be used for a single application service. With the d ...

Added by mike_revolution on Sun, 30 Jan 2022 03:06:50 +0200

After learning for so long, do you understand Java String?

#1. Characteristics of string ##1.1 invariance We often hear that the key of HashMap suggests using immutable classes, such as String. Immutability here means that once the class value is initialized, it can no longer be changed. If it is modified, it will be a new class. Let's write a demo to demonstrate it. public class test { public sta ...

Added by CrimsonSoul on Sun, 30 Jan 2022 03:00:35 +0200

Explain Java reflection operation in detail

Special invited author of enjoying learning class: Dream chasing youth Reprint, please state the source! In the process of java development, some frameworks such as Spring and SpringMvc are often used to simplify the development operation. In web development, we can use SpringMvc to quickly convert the request parameters and entities. When u ...

Added by y4m4 on Sun, 30 Jan 2022 02:09:24 +0200

Learn SpringBoot: how many parameters can you get through a request?

Previously, the principle of controller layer parameter encapsulation in springboot has been analyzed in the spring boot source code analysis - controller layer parameter encapsulation, but there will not be time for you to analyze slowly in the work, and sometimes it is necessary to query quickly. So today I'll summarize which parameters of th ...

Added by dud3r on Sun, 30 Jan 2022 00:11:53 +0200

Too hard core! This HashMap source code analysis can definitely be called the Bible

1, Foreword This is the second source code analysis after the hard core ArrayList source code analysis, which promised me to read it once a day; After learning this article, you will have a comprehensive understanding of the structure and methods of HashMap; Superman doesn't know how strong he is in the interview; For example, the capacity exp ...

Added by 10legit10quit on Sat, 29 Jan 2022 23:00:54 +0200

Study guide! Although it is the foundation of Java, many people have fallen into the pit

introduce This tutorial shows you the io operation of Java, creates a basic Java program, requests the user to input information, performs some operations on the information, and then outputs the specified target display results. In this tutorial, we will make a program to request the user's name, year of birth and current year. It will then ...

Added by taz321 on Sat, 29 Jan 2022 22:52:34 +0200

How to realize the gray publishing of micro service ecology?

Special invited author of enjoy learning class: Lao Gu Reprint, please state the source preface I believe many friends have heard of gray release, but they don't necessarily know how to realize it? Today we will introduce the basic principle and provide code implementation to our partners. Gray concept That is, the original production e ...

Added by shrimp on Sat, 29 Jan 2022 22:40:10 +0200

Hold your breath! Take you to the red and black tree and solve your confused data structure and algorithm series in one step

preface Originally, I just introduced the creation and use of red black tree from the aspects of application and simple ideological understanding. During this period of time, I want to deeply study the red black tree. I mainly refer to the content of Wikipedia and try to really realize this data structure with my own understanding and learning ...

Added by cyclops on Sat, 29 Jan 2022 22:31:14 +0200

Interception and processing of common request fields of SpringCloud in actual combat

background Taking the microservice system built by SpringCloud as an example, using a front-end and back-end separated architecture, each system will provide some general request parameters, such as system version information of the mobile terminal, IMEI information, IP information of the Web terminal, browser version information, etc. these p ...

Added by whizzkid-000 on Sat, 29 Jan 2022 21:48:13 +0200

Step by step! MySQL performance optimization steps evolve, and I can do it in one meal

It is generally accepted in the industry that MySQL is in the best state with a single table capacity of less than 10 million, because its BTREE index tree is between 3 and 5 Think: why is the index tree height of 10 million MySQL single table 3 ~ 5? Table building optimization Basic principles of field design: 1. When the requirements ...

Added by rajah on Sat, 29 Jan 2022 15:40:55 +0200