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

When deleting records logically - ensure the uniqueness of the business

catalogue Business background Business background Generally, some record tables of the business system have some uniqueness constraints. For example, duplicate names are not allowed under the same user; You can usually create a unique index on the specified column, for example: CREATE TABLE `novel` ( `id` bigint(20 ...

Posted by JayBachatero on Fri, 20 May 2022 14:36:13 +0300

[tree structure]: the directory structure for querying the complete path through multiple vertices

Demand background: Recently, in the data R & D platform, there is a search related demand: users can do fuzzy search through the Job name, return the relevant result set, and carry out the complete directory structure. The directory structure of the R & D platform is divided into four types: the root node is the workspace, the sub node ...

Posted by TipPro on Fri, 20 May 2022 07:42:29 +0300

JavaSE-No.8 - Polymorphism of the Three Features of Java

JavaSE Portal JavaSE_Start JavaSE-No.7.1 - Java's inheritance (super keyword) JavaSE-No.7.2 - Java's Inheritance (and Composition) content 1. The concept of polymorphism2. The realization conditions of polymorphism rewrite 3. Up and down transitions 3.1 Upward Transformation3.2 Downcasting instanceof 4. Rewritten design rules ...

Posted by Big X on Fri, 20 May 2022 00:12:51 +0300

Fundamentals: in depth analysis of JAVA exceptions

When an exception occurs in the method, an exception object will be created and handed over to the JVM for processing. The exception object contains the exception name, exception description and the state of the application when the exception occurs. The process of creating an exception object and handing it to the JVM is called throwing an ex ...

Posted by slindstr on Thu, 19 May 2022 10:38:24 +0300

Use of Golang-based functions

Hello, today I will share with you the content of Go Language function usage combed out. Please give us some advice. Thank you.The content of Go Language Function Use is divided into three chapters, which is the third chapter.Use of Golang-based functions (1)Use of Golang-based functions (2)Use of Golang-based functions (3)Contents of this chap ...

Posted by chrisio on Wed, 18 May 2022 19:01:20 +0300

How to Secure Your Documents with JSON Web Tokens (JWT)

How to Secure Your Documents with JSON Web Tokens (JWT) In this article, we explain how to use JSON Web Token JWT to protect online documents from unauthorized access, so that you can more securely integrate online document editor development into your own web applications. The open source office suite ONLYOFFICE Docs will be integrated her ...

Posted by shonuff on Wed, 18 May 2022 00:53:22 +0300

Introduction to Stream in Java 8

catalogue What is Stream How to create a Stream Operate on Stream Advanced Sequential flow Inert intermediate operation Execution sequence of operations summary What is Stream To answer this question, let's take a look at how the relevant JavaDoc describes: A sequence of elements supporting sequential and parallel aggregate oper ...

Posted by shergold on Tue, 17 May 2022 11:09:16 +0300

[Set framework] List, Set and Map

1, Basic points 1. A collection is similar to an array, but the number of elements in the collection can change dynamically Note: a collection can only store user-defined data types, not basic data types 2. Sets are divided into three categories List: the stored data can be repeated and in orderSet: the stored data is non repeatable and unor ...

Posted by my800stuff on Tue, 17 May 2022 01:13:38 +0300