Implementing Redis distributed lock from zero to one coding

Some students are so pissing. You can understand it. If you don't do it yourself, how can you understand it thoroughly? Let's do it together! Usage scenario and model selection The distributed multi node deployment mode makes it possible for shared variables to be operated at the same time. In case of data consistency requirements, global loc ...

Posted by phifgo on Thu, 09 Dec 2021 07:03:02 +0100

Java reflection Usage Summary

What is the reflection mechanism Reflection mechanism is to know all the properties and methods of any class in the running state; For any object, you can call any of its methods and properties; This kind of dynamically acquired information and the function of dynamically calling object methods are called the reflection mechanism of java langu ...

Posted by ngu_tri on Thu, 09 Dec 2021 04:07:18 +0100

Detailed explanation of Java internal classes

Inner class Definition of inner class Defining a class in another given class or method is called an inner class. Internal classes can be divided into four types: member internal classes, local internal classes, anonymous internal classes and static internal classes. Let's introduce these four internal classes one by one. Member inner class ...

Posted by mortona on Thu, 09 Dec 2021 03:33:37 +0100

Redis can easily implement the second kill system

This article is transferred from: Le byteThis article mainly explains: RedisFor more Java related information, you can pay attention to the official account number: 999Cache cacheCache conceptA cache is a replica set of original data stored on a computer for easy access.Common caching scenarios for Web projectsBuffer breakdownConcept:For some k ...

Posted by sunnyvatsal on Thu, 09 Dec 2021 02:05:46 +0100

A little trick makes it easy for Selenium to deal with scrollbars and element focus

01 JS processing scroll bar Execute via webdriver_ The script () method executes the JS script operation scroll bar Right scroll bar Firefox browser and Chrome browser use different syntax. It is listed in the following area. It looks like Google browser 71 general Firefox # Firefox browser scrolls to the bottom js = "var q=document.docum ...

Posted by Retired Bill on Wed, 08 Dec 2021 05:07:42 +0100

What about the Java logging framework

During project development, we can find problems through debug. In the online environment, we can only find problems by printing logs. Therefore, logging is a very important issue for a project. Therefore, how to choose an appropriate logging framework is also very important. In Java development, common logging frameworks include JDKLog, Log4J ...

Posted by howtoholdem on Tue, 07 Dec 2021 18:12:54 +0100

Exploration of kicking people off the assembly line in Spring Security framework

1. Background In the development of a project, the Spring Security permission framework is used for permission verification of back-end permission development. The bottom layer integrates spring Session components, which is very convenient to integrate Redis for Session cluster deployment of distributed sessions. After the system is officially ...

Posted by saco721 on Tue, 07 Dec 2021 16:23:57 +0100

Solon Cloud Distributed Development Suite checklist and quick overview

Solon Cloud is a series of interface standards and configuration specifications. Solon Cloud provides a simple and convenient programming mode for common distributed system modes to help developers build elastic, reliable and coordinated applications. Solon Cloud is built on Solon, which makes it easy for developers to start and quickly apply i ...

Posted by emmbec on Tue, 07 Dec 2021 06:58:00 +0100

Stop new objects everywhere. Try the three factory model. It's really fragrant

Are you still looking for new objects everywhere? Single dog: I have no object. What's the matter with new? The new object itself is no problem, but not all new keywords. In fact, there is a better way. You can try the factory mode when appropriate, and the code will be more elegant. What is the factory model? As the name suggests, &qu ...

Posted by kellog on Mon, 06 Dec 2021 03:47:10 +0100

Gao fushuai in unit testing, Pytest framework, hand-in-hand teaching, high-order usage practice

1, Front back approach in xunit style 1. Pre post method of function use case Use cases are defined in the form of functions in the module, which can be defined through setup_function and teardown_function to define the pre and post methods of function use cases. The use cases are as follows: def setup_function(function): print("Functi ...

Posted by jordanwb on Fri, 03 Dec 2021 17:33:48 +0100