dubbo source code analysis 1 -- ExtensionLoader.getExtensionLoader

In dubbo source code, extension loader is often used, which uses java SPI mechanism. ProxyFactory proxyFactory = ExtensionLoader. getExtensionLoader(ProxyFactory.class).getAdaptiveExtension(); Protocol protocol = ExtensionLoader. getExtensionLoader(Protocol.class).getAdaptiveExtension(); summary 1. Judge whether the clas ...

Posted on Mon, 30 Mar 2020 15:33:47 -0400 by hrichman

Source code analysis of spring IOC

1: Principle When the bean is a singleton, the singleton bean is obtained from the cache; if not, the singleton bean is created. When the singleton bean is created, the constructor of the bean is obtained by reflection. The bean is instantiated by the constructor, and then dependency injection is performed when the bean is assembled. After tha ...

Posted on Mon, 30 Mar 2020 15:07:24 -0400 by Oxymen

Chapter 9 set, Comparator, Comparable

About Comparator Comparator example Entity class Classes dedicated to comparison Function Result The difference between Comparable and Comparator Some skills of Java comparator About Comparator There are two kinds of comparators in Java. Before, we said comparable, but now we use Comparator; Using the comparator, yo ...

Posted on Mon, 30 Mar 2020 15:07:09 -0400 by dsds1121

FutureTask parsing source code

1: use package com.huiguan.facade.mobile; import java.util.concurrent.*; /** * @author chengwei * @since $$Revision:1.0.0, $$Date: 2018/4/26 11:39 $$ */ public class FutureDemo { public static void main(String[] args) { try { //Create a thread pool, which is not recommended ExecutorService threadPool = ...

Posted on Mon, 30 Mar 2020 14:36:34 -0400 by kiowa_jackson

Use of springboot~WebTestClient

When using springboot for development, unit testing is necessary. When you build a spring project, it will generate a test project for us. When your project starts, the test cases are carried out at the same time. When we carry out the integration test of the WEB layer, we can use the WebTestClient tool provided by spring for us, which is very ...

Posted on Mon, 30 Mar 2020 14:33:54 -0400 by nkyoung1

Integer partition and output results, java, python

Integer partition is a typical recursive problem: an integer nn is divided into a series of combinations of numbers whose value is no more than mm. For example, if n=5n=5, m=4m=4, the partition can be: {4,1}, {3,1,1}, {3,2}, {2,1,1}, {2,2,1}, {1,1,1}. There are six combinations. As long as the total number of output division, ...

Posted on Mon, 30 Mar 2020 13:48:30 -0400 by pedrokas

The difference between mirror and repository in Maven configuration file and central warehouse configuration

1. The difference between mirror and repository in Maven configuration file 1.1 repository A repository is a warehouse. There are two kinds of warehouses in maven: local repository and remote repository. 1.1.1 there are three kinds of remote repositories Central warehouse: http://repo1.maven.org/maven2/ Private service: maven repository built ...

Posted on Mon, 30 Mar 2020 09:10:07 -0400 by verN

What are the differences between the requirements of small and large companies for writing unit test?

When developing the system, the company will require developers to write unit test, but different companies have different requirements for writing unit test. Here are some ways to write unit test. 1. Create a project and introduce the jar package related to unit test <dependency> <groupId>org.springframework.boot</groupId ...

Posted on Mon, 30 Mar 2020 06:15:12 -0400 by vaan

Client error: unknown code for readObject at 0x32

Problem description Yes, this is the problem encountered in using the XXL distributed timed task framework. Most of the solutions given on the Internet for this kind of problem are about the wrong project address of the actuator configuration scheduling center. You need to modify the configuration xxl.job.admin.addresses. I don't use the distri ...

Posted on Mon, 30 Mar 2020 01:06:03 -0400 by Ekano

Read the Hadoop 3.2 source code, and deeply understand the common operations and HDFS principles of java calling HDFS

This article will use a demonstration project to quickly start the common operations of java calling HDFS. Next, take the creation of files as an example, through reading the source code of HDFS, step by step to expand the explanation of HDFS related principles and theoretical knowledge.Note: this document is based on the latest version of Hado ...

Posted on Mon, 30 Mar 2020 01:01:09 -0400 by thegreatone2176