Java concurrency tool J.U.C1
Lock (Synchronized)
Before the emergence of Lock interface, the concurrent safe processing of multithreading in Java applications can only be solved based on the synchronized keyword. However, synchronized has some shortcomings in some scenarios, that is, it is not suitable for all concurrent scenarios. However, after Java 5, the emergence ...
Posted by clartsonly on Fri, 18 Feb 2022 21:40:31 +0100
on java 8 learning notes 2022.2.17-2022.2.18
2022.2.17
problem
As you will see in Chapter 8, when inheritance is introduced, the class (subclass) derived from inheritance can access the protected members of the parent class and the public members (but not the private members). Only when two classes are in the same package can it access the package access members of the parent c ...
Posted by suncore on Fri, 18 Feb 2022 21:30:29 +0100
How does the Spring source code solve the cyclic dependency of beans
First of all, we need to understand that spring supports circular dependency only when the scop is a single instance bean. Beans with a scope of prototype type are not supported. A new instance will be created every time it is called. Spring will first instantiate various attribute dependencies of the bean when instantiating the bean. If testa ...
Posted by yelvington on Fri, 18 Feb 2022 20:58:07 +0100
Avoid deadlock hazard
In the concurrent environment, in order to ensure the thread safety of sharing variable data, we need to use the locking mechanism. If the lock is not used properly, it may cause deadlock, thread starvation and other problems.
If a deadlock occurs in a Java application, the program cannot be recovered automatically, which will seriously cause ...
Posted by jamfrag on Fri, 18 Feb 2022 19:54:29 +0100
Wechat web page sharing (with wechat public platform)
Source code download address: https://download.csdn.net/download/bynn_csdn/81350948
I preparation
Prepare a domain name (the legal links shared by wechat are all attached under the domain name, but the ip name of the server is not available). It is also OK to use the intranet penetration method (I used the intranet penetration method i ...
Posted by sn202 on Fri, 18 Feb 2022 19:34:35 +0100
Actual combat of Niuke backend project: optimizing login module
1. Use Redis to store verification code
The verification code needs frequent access and refresh, which requires high performance.The verification code does not need to be saved permanently, and it usually becomes invalid after a short time.During distributed deployment, there is a problem of Session sharing.
2. Use Redis to store login creden ...
Posted by CarbonCopy on Fri, 18 Feb 2022 19:21:56 +0100
Dry goods chapter | encountered a very practical Shell, use the script instance!
Like and watch again, form a habit!
The day before yesterday, I saw a reader sharing several Shell script example topics in the group. I simply saw them. Why not write and consolidate the basic knowledge, as follows:
1. Obtain the hostname from several machines concurrently, record the time spent returning the information, and redirect to a ...
Posted by rabidvibes on Fri, 18 Feb 2022 18:25:18 +0100
How to build an employee management system
Employee management system
1. Preparation
Import html and front page first Establish two entity classes: Department and Employee
Department:
package com.dary.sweb.pojo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
//Department table
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Dep ...
Posted by Graeme1972 on Fri, 18 Feb 2022 18:12:59 +0100
Confused by the interviewer again? It's better to take ThreadLocal apart and crush it to see if you can understand more!
Xiaobian's words
At the end of the article, the author sorted out a lot of materials for you! Including Java core knowledge point + full set of architects learning materials and videos + Kwai Tai interview Treasure + interview resume template + Ali group NetEase, Tencent Iqiyi millet quick Iqiyi beep miles interview question +Spring source cod ...
Posted by vixtay on Fri, 18 Feb 2022 18:10:03 +0100
RabbitMQ Java HelloWorld example
introduce
precondition
This tutorial assumes that RabbitMQ has install And run in Standard port (5672). If you use different hosts, ports, or credentials, you need to adjust the connection settings.
Where can I get help
If you have problems reading this tutorial, you can mailing list Or RabbitMQ community Slack contact us. ...
Posted by TTT on Fri, 18 Feb 2022 18:02:06 +0100