Five new features of jdk8 Stream API

Introduction The Java 8 API adds a new abstraction called streaming Stream, which allows you to process data in a declarative way. Stream provides a high-level abstraction of Java set operations and expressions in an intuitive way similar to querying data from a database using SQL statements. Stream API can greatly improve the productivity of ...

Posted by phpnewbiy on Wed, 08 Apr 2020 09:26:34 +0200

mybatis executes a sql process

An insert operation Take the simple operation of saving a record to the table as an example. Follow this example to track how the MySQL statement executes. To save a user record to the table: sqlSession.insert("x.y.insertUser", user); First of all, we need to look at the sqlsession ා insert method, and find the specific implementation in the D ...

Posted by myshoala on Wed, 08 Apr 2020 06:24:07 +0200

Solve Bug Path - dubbo apps cannot reconnect zookeeper

Preface Dubbo is a mature and widely used framework.Rao is such that in some extreme cases dubbo-based applications will also have the problem of not being able to reconnect zookeeper.Because this problem is easy to cause relatively large failures, the author has spent a lot of time to locate, and now will write a blog to share the investigatio ...

Posted by rschneid on Tue, 07 Apr 2020 05:02:01 +0200

Shocked! How can terminating a thread in this way cause service downtime?

Before we start, let's look at what's wrong with the following code? public class ThreadStopExample { public static void main(String[] args) throws InterruptedException { Thread t1 = new Thread(() -> { try { System.out.println("Subthread start execution"); // Simulation business process ...

Posted by snorky on Mon, 06 Apr 2020 17:34:00 +0200

[Netty basic to entry] 1. Network programming IO mode BIO&NIO&AIO

IO model elaboration IO model is to use what kind of channel to send and receive data. Java supports three kinds of network programming IO modes: BIO, NIO, AIO BIO(Blocking IO) Synchronous blocking model, one client connection corresponds to one processing thread Disadvantages: 1. Read operation in IO code is blocking operation. If the c ...

Posted by digi24 on Mon, 06 Apr 2020 12:24:46 +0200

Summary: the bug of function dictionary automatically added in ATM project

introduce Based on ATM project, this paper introduces a practical programming technique, which uses decorator to add the specified functions in the project to the dictionary. Using the characteristics of dictionary accessing value through key, the user can input the number, and directly obtain and call the function corresponding to the number t ...

Posted by Fearpig on Mon, 06 Apr 2020 10:50:22 +0200

springboot uses logback to generate log files by date and size

Change from: https://www.ericgg.com/archives/3848.html The default log files of springboot will not be automatically divided by day, so the log files of the production environment are getting larger and larger, which is not conducive to troubleshooting. After checking a lot of data, the final configuration is as follows. The log files can be d ...

Posted by jklanka on Mon, 06 Apr 2020 10:22:10 +0200

Many people do not know the knowledge of Python multi process and multi thread details!

Single process and single thread: a person eats food on a table.2. Single process and multithreading: many people eat together on the same table.3. Multi process single thread: many people, each of them, eat at their own table. The problem of multithreading is that when more than one person eats a dish at the same time, it is easy to compete. ...

Posted by godsent on Mon, 06 Apr 2020 08:41:44 +0200

Abort signal: how to cancel asynchronous tasks in JavaScript

By Tomasz Jakut Crazy technology house Original text: ckeditor.com/blog/Aborti... No reprint without permission Sometimes it can be difficult to perform asynchronous tasks, especially when a specific programming language does not allow you to cancel operations that are not started by mistake or are no longer needed. Fortunately, ...

Posted by kustomjs on Mon, 06 Apr 2020 04:14:50 +0200

[Seata microservice distributed transaction] 1. Seata server environment construction

Seata serve installation package Download the Seata Server package, all I have is version 0.9.0 https://github.com/seata/seata/releases wget https://github.com/seata/seata/releases/download/v0.9.0/seata-server-0.9.0.tar.gz Link: https://pan.baidu.com/s/1jlBwCEYM3hn7zQiSpwRijg password: 56vm After 0.9.0 of the official website, there is no ...

Posted by davespring on Mon, 06 Apr 2020 02:29:27 +0200