The factory mode of design mode is the strongest in history. It's hard to argue against it!

Design pattern is a high-level abstract summary of various codes written in your actual work. If you don't learn design pattern, the abstraction ability will certainly not be too strong. There are 23 common design patterns. Today we only talk about the simplest factory pattern.Factory mode is a creation mode, which obtains new objects one by on ...

Posted on Tue, 07 Dec 2021 01:46:08 -0500 by sheffrem

Making Docker image with SpringBoot(2.4) application (official scheme of Gradle version)

Overview of this articleThis paper demonstrates how to make a springboot application based on gradle into a docker image through actual combat. The relevant software version information is as follows:Operating system: macOS Big Sur 11.2.2JDK: 1.8.0_211gradle: 6.8.3docker: 20.10.5springboot: 2.4.4New java projectIn order to be closer to the actu ...

Posted on Tue, 07 Dec 2021 03:26:54 -0500 by ctsttom

Summary of common Spring Boot annotations

  Summary of common Spring Boot annotations 1, Start annotation @ SpringBootApplication @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) @Documented @Inherited @SpringBootConfiguration @EnableAutoConfiguration @ComponentScan(excludeFilters = { @Filter(type = FilterType.CUSTOM, classes = TypeExcludeFilter.class), @Filter(type = ...

Posted on Tue, 07 Dec 2021 01:46:28 -0500 by AMV

Transplantation of LVGL V8 on STM32F429

LVGL is a good thing to use. Now there are more and more tutorials on the Internet, many of which are for V7 and below, but the upgrade of V8 for V7 is still very large, and the use methods of many controls are different, so there needs to be a suitable migration project to use. I've been trying to transplant these two days, and there have bee ...

Posted on Tue, 07 Dec 2021 03:55:35 -0500 by harristweed

Kotlin: how to achieve multi-threaded synchronization?

Problem backgroundMultithreaded tasks to be executed: Task 1 and task 2 are executed in parallel; When all execution is completed, execute task 3.// Each task takes time to simulate through sleep val task1: () -> String = { sleep(2000) "Hello".also { println("task1 finished: $it") } } val task2: () -> String = { sleep(2000) ...

Posted on Tue, 07 Dec 2021 03:49:30 -0500 by lulon83

Some Tips in Kotlin development

Scope function selection At present, there are let, run, with and apply   and   also five scope functions. The official document has a table to illustrate the differences between them: To sum up, there are several differences: 1. apply and also return context objects. 2,let,run   And with return lambda results. 3. The ref ...

Posted on Tue, 07 Dec 2021 03:21:03 -0500 by febrarian