Spring -- Junit test tool, property injection method, annotation

1. Junit test tool Junit is a unit testing framework for Java programming language Common comments are: @BeforeClass: indicates that the method using this annotation is executed before the test class is called. This annotation can only be declared once in a test class, and the method corresponding to ...

Posted by Sanoz0r on Sun, 16 Feb 2020 23:18:51 -0800

Dynamic agent, annotation, classloader learning

Record learning content Today's main learning: dynamic agent, annotation, classloader 1, Dynamic agent Role: enhance a method. There are three ways to enhance an object: 1. Inherit, override method after inheriting parent class. Advantages: simple, easy to implement, can inherit the class after rewritin ...

Posted by mizkit73 on Sun, 16 Feb 2020 02:50:18 -0800

[Netty] decoder related: DelimiterBasedFrameDecoder

Article directory Preface Experimental code Follow up source code Inheritance relationship of DelimiterBasedFrameDecoder Property of DelimiterBasedFrameDecoder Analysis of construction method decode implementation Preface This section will take a look at the decoder that Netty provides to user ...

Posted by ATS16805 on Sat, 15 Feb 2020 06:11:08 -0800

Simple IOC container implementation

Preface This article is written to learn the execution process of the Spring IOC container. It can't fully represent the Spring IOC container, but simply implements the dependency injection and control inversion functions of the container, which can't be used in production. It can only play a certain role in understanding the Spring container. ...

Posted by ExpendableDecoy on Mon, 10 Feb 2020 05:03:49 -0800

Maven - Configuration Management

Maven Maven is an automated build tool that focuses on project building and dependency management for the Java platform. Project Object Model: Project Object Model. The information of Java project is encapsulated as object form, which is convenient for operation and management. Maven action 1 add the third-party jar package: after using Maven, ...

Posted by yobo on Sun, 09 Feb 2020 02:35:47 -0800

Rabbit MQ practice [topic switch]

spring boot version: 2.1.10.RELEASE This article involves two projects, rabbitmq topic provider and rabbitmq topic consumer, with the same dependency and configuration. Dependent dependence <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot ...

Posted by lbraine on Mon, 03 Feb 2020 06:44:42 -0800

Spring: register beanDefinition with Spring IOC annotation method

Article directory 1. beauties 2. overview 3. cases 3.1 case 1 4. Container initialization 5.AnnotationConfigApplicationContext 5.1 registerBean 5.1.1 class file registration 5.1.2 AnnotationBeanDefinitionReader#doRegisterBean 5.2 scanBean mode 5.2.1 ClassPathBeanDefinitionScanner#doScan 1. b ...

Posted by LoStEdeN on Mon, 03 Feb 2020 04:20:53 -0800

Spring-1 - important concepts

1, IOC and DI IOC (reverse control): the creation of objects is handed over to spring for configuration. DI (dependency injection): sets values to properties in a class.Relationship between IOC and DI: DI cannot exist alone and needs to be completed on the basis of IOC. 2, Scope of Bean Singleto ...

Posted by Willburt on Sat, 18 Jan 2020 00:04:01 -0800

Springboot unit test@

In computer programming, unit testing is a software testing method, which is used to test a single unit of source code, a collection of one or more computer program modules, and related control data, use process and operation process to determine whether they are suitable for use. In short, when we are doing unit tests, we only test one code un ...

Posted by anthonydamasco on Thu, 16 Jan 2020 07:37:32 -0800

[winter vacation 2020] Day1 Java advanced

What java needs to learn today is: 1. Junit unit test 2. reflection 3. notes Junit unit test: Test classification: Black box test: no need to write code, give input value, see whether the program can output the expected value. White box test: need to write code. Pay attention to the specifi ...

Posted by curtis_b on Sun, 12 Jan 2020 19:38:07 -0800