Building an Android Project with Kotlin DSL

Preface Android supports using Kotlin DSL to build Gradle scripts, don't you want to learn a wave yet? Theme of this article: 1. How to replace Groovy with Kotlin DSL 2. Problems encountered in the process and Solutions Why use Kotlin DSL Advantages of using Kotlin DSL: Since Kotlin is now the offi ...

Posted by shubham.amola on Mon, 09 Mar 2020 18:10:09 -0700

Shiro -- Basic authentication process

Introduction: In shiro, users need to provide principles and credentials to shiro so that the application can verify the user's identity: Principles: identity, that is, the identity attribute of the principal, can be anything, such as user name, mailbox, etc., only. A principal can have multiple principals, but only one primary principal, usual ...

Posted by lopes_andre on Wed, 26 Feb 2020 22:52:49 -0800

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