Two ways to implement timed tasks in Spring Boot
in Spring + spring MVC environment, generally speaking, we have two schemes to implement Scheduled tasks. One is to use the @ Scheduled annotation of spring's own Scheduled task processor, and the other is to use the third-party framework Quartz. Spring Boot is derived from spring + spring MVC, so it naturally has the implementatio ...
Added by xeelee on Mon, 07 Feb 2022 14:31:21 +0200
python learning notes
Connected to python learning notes (2)
1, Object oriented Foundation
1. Object oriented understanding
Object oriented is to regard programming as a thing. For the outside world, things are used directly, regardless of their internal situation. Programming is to set what things can do. Object oriented is used to simplify code
2. Clas ...
Added by regoch on Mon, 07 Feb 2022 14:28:15 +0200
Reentrantlock AQS source code analysis
Speaking of AQS, we have to say that the classic ReentrantLock is the best embodiment of AQS However, we can briefly talk about AQS characteristics first
What is AQS?
Abstract queue synchronizer
All request threads form a CLH queue. When a thread finishes executing lock When you unlock, your subsequent nodes will be activated. The executing ...
Added by bedted on Mon, 07 Feb 2022 13:06:47 +0200
[Mybatis source code analysis] summary of design patterns involved in Mybatis source code
Although we all know that there are 26 design patterns, most of them stay at the conceptual level and are rarely encountered in real development. A large number of design patterns are used in Mybatis source code. Reading the source code and observing the application of design patterns in it can have a deeper understanding of design patterns. My ...
Added by AliceG on Mon, 07 Feb 2022 11:39:13 +0200
Go language - basic grammar
Hello,GO!
package main // Define package name
func main() {
print("Hello,Go")
}
main function points
++No parameter, no return value++The main method must be in the main packagego run main.go can be executedIf the file is not called main Go, you need to go build and then go run
Package declaration - package declaration
Syntax form: p ...
Added by rohithreddyk on Mon, 07 Feb 2022 10:58:54 +0200
Detailed explanation of multithreading
Multithreading
The difference between concurrency and parallelism:
Concurrency: a single core CPU handles multiple things at the same time,
Parallelism: multi-core CPU s process multiple things at the same time.
1. Four creation methods of multithreading
Integrated Thread classImplement the Runable interfaceImplement Callable interfaceThre ...
Added by maxat on Mon, 07 Feb 2022 07:08:27 +0200
Special customization of SpringMvc in SpringBoot
There are many @ beans in the automatic configuration classes of SpringMvc. SpringBoot automatically configures some default properties of SpringMvc according to these classes. We can override this @ Bean to customize some of our own special things. Auto configuration class name: webmvcoautoconfiguration In most cases, SpringBoot marks m ...
Added by desmond_ckl on Mon, 07 Feb 2022 05:20:16 +0200
Implementation of Spring Cloud Alibaba Nacos service registration and discovery function!
Nacos is an important part of Spring Cloud Alibaba. It provides two important functions: service registration and discovery and unified configuration center.The service registration and discovery function has solved the function of the connection management and request forwarding of the caller and the service provider in the micro service clust ...
Added by shiggins on Mon, 07 Feb 2022 04:23:31 +0200
Web is Easy,Let's try Gin
I quick start
Download the package of gin: go get GitHub com/gin-gonic/gin
The hello world written by gin is as follows:
package main
import "github.com/gin-gonic/gin"
func main() {
router := gin.Default()
router.GET("/hello", func(context *gin.Context) { // Register a path handler
context.Writer.WriteString("Hello!")
})
ro ...
Added by bad_gui on Mon, 07 Feb 2022 00:01:26 +0200
Tool for java Concurrent Programming sharing model - AQS + ReentrantLock
preface
This article discusses the AQS interface provided in JDK and one of its implementation classes, ReentrantLock. The article is based on the book "the art of Java Concurrent Programming" and the video of dark horse Dark horse multithreading Take notes.
1. AQS
1. Concept
Overview: the full name is AbstractQueuedSynch ...
Added by IronWarrior on Sun, 06 Feb 2022 23:44:45 +0200