Concurrent programming: the things executed out of order will be clear to you in five minutes

What is out of order execution Disordered execution [1] is simply the execution order of the code in the program, which may be adjusted by the compiler and CPU according to some strategy (commonly known as "disordered") - although from the perspective of single thread, disordered execution does not affect the execution result. Why d ...

Posted by NoDoze on Sat, 30 Oct 2021 06:42:26 -0700

MyBatis framework dynamic Sql

MyBatis framework dynamic Sql Dynamic SQL: judge the conditions through various tags provided by MyBatis to realize dynamic splicing of SQL statements. The expression used for conditional judgment here is OGNL expression. The commonly used dynamic SQL tags are,,, and so on. The dynamic SQL statement of MyBatis is very similar to the stat ...

Posted by Pyro4816 on Sat, 30 Oct 2021 02:13:56 -0700

Java learning notes - io stream

io usage scenarios When we want to store some data in the disk so that the data can be found when the program closes and runs again, we need to write the data out of the program with io stream, write it to the local file, or save it to the database, etc. iO details Check the java API documentation -- java.base -- java.io. It is found ...

Posted by chalexan on Sat, 30 Oct 2021 02:04:49 -0700

Basic part: JAVA collection, special for interview

There's nothing to say. Everyone here is beautiful List array Vector vector Stack stack Map mapping dictionary Set set Queue queue Deque bidirectional queue Pay attention to the official account and exchange with each other. Search by WeChat: Sneak ahead. General method of general queue Operation method Throw exception Blocking thread Re ...

Posted by mephistoo on Sat, 30 Oct 2021 01:54:56 -0700

Learning and interpretation of Java RMI

Write in front # Following the previous article, this article mainly looks at the source code of the whole RMI process and makes a simple analysis RMI source code analysis # Let's review the RMI process first: Create a remote object interface (RemoteInterface)Create a remote object class (RemoteObject) to implement the remote object interfa ...

Posted by zoobooboozoo on Sat, 30 Oct 2021 00:52:36 -0700

Getting started with Spring Security

Getting started with Spring Security 1, Use of Spring Security 1.1 basic terms Spring Security is a powerful and highly customizable authentication and authorization framework. It is a set of Web security standards for spring applications. Spring Security focuses on providing authentication and authorization functions for java applicatio ...

Posted by tunari on Sat, 30 Oct 2021 00:00:24 -0700

High frequency interview question: a picture to thoroughly understand Spring circular dependency

home pagespecial columnjavaArticle details0High frequency interview question: a picture to thoroughly understand Spring circular dependencyJava general Published 10 minutes ago1 what is circular dependency?As shown in the figure below:BeanA class depends on BeanB class, and BeanB class depends on BeanA class. This dependency forms a closed loop ...

Posted by Singularity on Fri, 29 Oct 2021 23:17:32 -0700

Implementation of Leader election in k8s client go

introduce In recent years, with the increasing demand for reliable systems and infrastructure, the term "high availability" has become more and more popular. In distributed systems, high availability usually involves maximizing uptime and making the system fault-tolerant. In high availability, a common practice is to use redunda ...

Posted by Rheves on Fri, 29 Oct 2021 22:54:48 -0700

Comparison of objects in java (three ways)

Question raised Last class, we talked about priority queue. When inserting elements into priority queue, there is a requirement: the inserted elements cannot be null or the elements must be able to be compared. For simplicity, we just inserted Integer type. Can we insert custom type objects in priority queue? Let's start with a code: clas ...

Posted by jenniferG on Fri, 29 Oct 2021 21:18:00 -0700

Java string

  catalogue 1, Traversal string 2, Count the number of various characters 3, Splice string 4, String inversion 1, Traversal string public static void StringTest03(){ System.out.println("Please enter a string:"); String str = sc.nextLine(); for (int i = 0; i < str.length(); i++){ System.out. ...

Posted by jgh84 on Fri, 29 Oct 2021 21:07:49 -0700