Analysis of Spring source code -- DI (dependency injection)

Spring core DI Official website interpretation Dependency injection (DI) is a process whereby objects define their dependencies (that is, the other objects with which they work) only through constructor arguments, arguments to a factory method, or properties that are set on the object instance after it is constructed or returned from a fa ...

Posted by kfir91 on Thu, 20 Jan 2022 15:10:56 +0100

Introduction to SpringMvc and related interview questions

1. Spring MVC overview Spring MVC is a WEB layer and control layer framework, which is mainly used to interact with clients and call business logic. Spring MVC is a major component of the spring family. Spring MVC can achieve seamless integration. Features: easy to use and good performance 2. Advantages of spring MVC over Servlet a. The deve ...

Posted by The Cat on Thu, 20 Jan 2022 14:52:16 +0100

Spring Security Learning -- form based authentication

preface Starting from this article, we are officially learning spring security. On the basis of the first two blogs, we slowly enrich our examples (not mine, but a course on mk online) helloworld The development of spring security is different from the application development of our ordinary projects. We first run through the spring security ...

Posted by aaronxbond on Thu, 20 Jan 2022 11:56:58 +0100

Spring source code parsing -- spring web request Map initialization

brief introduction In the previous article, we roughly analyzed how Spring maps the request path to the processing method, but the initialization related to the mapping is still a fog for us This article will explore how to initialize the mapping between request path and processing method overview Based on the previous article: Spring sourc ...

Posted by jds580s on Thu, 20 Jan 2022 11:44:49 +0100

Pit Guide: three ways for Spring to configure data sources

1, ForewordToday, I learned three ways to configure Druid data source with spring, and sorted out my study notes. I hope you like it!2, Role of data sourcesData source (connection pool) is the key to improve program performance, such asInstantiate the data source in advance and initialize some connection resourcesGet from data source when using ...

Posted by ranjita on Thu, 20 Jan 2022 11:22:32 +0100

feign interceptor and decoder

Feign interceptor and decoder Business requirements In the Spring Cloud project, service A uses Feign to call an interface of service B. if it is necessary to pass A global authentication token or parameter, it is obviously not advisable to add A corresponding field in the method parameter. The first thought is the AOP method, which uses the ...

Posted by chintupintu03 on Thu, 20 Jan 2022 06:27:33 +0100

Principle and application of openFeign

1. Foreword Earlier, we introduced the soul ferry Nacos in Spring Cloud. Compared with its predecessors, it is not only powerful, but also very simple to deploy. Today, we will introduce a component of service invocation: OpenFeign, which is also a cruel role beyond its predecessors (Ribbon and Feign). The article contents are as follo ...

Posted by Robert Plank on Thu, 20 Jan 2022 01:58:42 +0100

Common scenarios of Spring transaction failure

preface For students engaged in java development, spring affairs must be familiar. In some business scenarios, the data of multiple tables needs to be written simultaneously in one request. In order to ensure the atomicity of operations (success or failure at the same time) and avoid data inconsistency, we generally use spring transaction ...

Posted by CentralOGN on Wed, 19 Jan 2022 21:14:10 +0100

Spring02--IOC control inversion

IOC (Inversion of Control) is a concept and an idea. It refers to handing over the call right of the object directly controlled by the program code to the container, and realizing the assembly and management of the object through the container. Inversion of Control is the transfer of control over the object, from the program code itself to ...

Posted by discobean on Wed, 19 Jan 2022 15:21:48 +0100

The design pattern interview strategy and factory pattern replace the complex ifelse in the business scenario

The design pattern interview strategy and factory pattern replace the complex ifelse in the business scenarioI'm fat brother, an unprofessional interviewer!I am embarrassed, a young rookie actively looking for a job!What Xiaobai fears most in the interview is that the knowledge asked by the interviewer is too general and he can't quickly locate ...

Posted by tinkertron on Wed, 19 Jan 2022 14:18:57 +0100