Multithreaded learning four

Navigation 1,Multithreaded learning one 6. No lock of shared model In this chapter, we will implement concurrency control through non blocking optimistic locks 6.1 problem raising There are the following requirements to ensure the thread safety of the account.withdraw withdrawal method Test5.java public class Test5 { public static vo ...

Posted by BigMonkey on Tue, 30 Nov 2021 15:56:11 -0800

Analysis of Java object transformation scheme and practice of mapstruct

I. Preface With the continuous refinement of system module layering, the conversion of various objects is inevitably involved in the daily development of Java, such as DO, DTO, VO, etc. writing mapping conversion code is a cumbersome, repetitive and error prone work. With the help of a good tool, it not only reduces the workload, improves the ...

Posted by Paul1893 on Tue, 30 Nov 2021 15:12:12 -0800

JVM learning notes

1. Introduction to JVN Talk about your understanding of JVM? java8 virtual machine and previous changes and updates?OOM memory overflow, StackOverFlowError stack overflow, how to analyze?What are the common tuning parameters of the JVM?How to capture memory snapshots and analyze Dump files?What do you know about class loader in JVM? rt-jar ...

Posted by thirdeye on Tue, 30 Nov 2021 14:41:42 -0800

Elasticsearch learning notes

1 getting started with elasticsearch Elasticsearch is an open source search engine based on Apache Lucene. Whether in open source or proprietary domain, Lucene can be regarded as the most advanced, best performing and most powerful search engine library so far. However, Lucene is just a library. If you want to use it, you must use Java as ...

Posted by joon on Tue, 30 Nov 2021 14:09:50 -0800

SpringBoot Foundation: declarative transactions and faceted transactions and programmatic transactions

preface Transaction is one or more database operations that need to ensure atomicity, isolation, consistency and persistence at the same time This article will explain the implementation methods of two transactions in springBoot, programming transaction configuration and declarative transaction configuration, as well as aspect transactions. O ...

Posted by Skyphoxx on Tue, 30 Nov 2021 13:34:46 -0800

Spring Bean lifecycle and callbacks

1. Introduction Understand the Spring bean life cycle of Spring container management, including the understanding of Spring container and IoC. Understand both the Spring bean lifecycle callback handler and the postprocessor. The Spring Framework provides several callback methods to create beans and some methods to destroy beans in the Spring I ...

Posted by mlai4167 on Tue, 30 Nov 2021 13:25:24 -0800

Usage demo of thread pool ThreadPoolExecutor

1. Example code: Runnable + ThreadPoolExecutor First create a Runnable Implementation class of interface (of course, it can also be Callable Interface. We also mentioned the area of the two above Don't MyRunnable.java import java.util.Date; public class MyRunnable implements Runnable { private String command; ...

Posted by sharal on Tue, 30 Nov 2021 13:22:58 -0800

Chapter 14 Job JAVA

1. What are the classifications of streams in Java? (1) Flow direction: generally divided into input and output streams Input stream: For example, System.in is an InputStream type input stream Output stream: For example, System.out is a PrintStream type output stream (2) From the reading type: generally divided into byte stream and character st ...

Posted by Gayathri on Tue, 30 Nov 2021 10:03:13 -0800

Deep thinking on changing redirect from https to http

background Service deployment and jump are shown as follows: The user requests to load the specified application through Alibaba cloud through http. The application returns the jump path (status 302), but the jump path is http (not https), so it cannot be accessed 2.1 jump pseudo code: // ModelAndView mv.setViewName(WebCst.REDIRECT + "/adm ...

Posted by Hitman2oo2 on Tue, 30 Nov 2021 09:23:41 -0800

Sliding events of Hongmeng learning notes (common actions)

Tips: Slide event: after clicking, slide this module. Common scenes: rotation chart sliding, article list up and down linkage, novel page turning, etc. Common actions of sliding events: Press, move and release   We learned the click, double click and long press events. Today we will learn a new knowledge point, sliding event, whi ...

Posted by Jeb. on Tue, 30 Nov 2021 09:06:41 -0800