Analysis of Ribbon principle and Nacos service discovery principle

Ribbon principle analysis Ribbon uses interceptors to realize remote invocation of services. The source code is as follows: public class LoadBalancerAutoConfiguration { @LoadBalanced @Autowired(required = false) private List<RestTemplate> restTemplates = Collections.emptyList(); @Autowired(required = false) private List<Lo ...

Posted by amity on Thu, 10 Feb 2022 23:21:31 +0100

Spring IOC: control inversion

Steps for using the Spring framework Join dependencyCreate class: interface, implementation class and class without interfaceCreate a Spring configuration file and declare it with < bean >Using the object in the container, use the method getBean() of ApplicationContext IOC: control reversal The implementation of ioc technology uses di ...

Posted by bharrison89 on Thu, 10 Feb 2022 22:10:58 +0100

SpringCloud - teach you how to build the SpringCloud Config configuration center

Springcloud (VI) - teach you how to build the SpringCloud Config configuration center   Reprint: Renaissance_ https://www.jianshu.com/p/f85733ef2819 When there are too many microservices, the configuration of each microservice is difficult to manage centrally. SpringCloud Config implements centralized configuration management through git ...

Posted by tonchily on Thu, 10 Feb 2022 17:31:07 +0100

ByxContainerAnnotation -- an annotation based lightweight IOC container

ByxContainerAnnotation is a lightweight IOC container based on annotations that mimics Spring IOC. It supports constructor injection and field injection, circular dependency processing and detection, and has a highly extensible plug-in system. Project address: https://github.com/byx2000/byx-container-annotation Maven introduction <reposit ...

Posted by brewmiser on Thu, 10 Feb 2022 10:27:34 +0100

Spring 06 -- proxy pattern and AOP

1, Agent mode The bottom layer of spring AOP Agent mode classification: Static proxyDynamic agent Benefits of agent mode: It can make the operation of real roles more pure, without paying attention to some public businessesThe public business is handed over to the agent role, which realizes the division of businessWhen the public business ...

Posted by mlschutz on Wed, 09 Feb 2022 20:04:35 +0100

The way of basic learning of spring framework

1, IoC control reversal IoC control inversion, fully known as Inverse of Control, is a design conceptThe agent creates and manages the object, and the consumer obtains the object through the agentThe purpose of IoC is to reduce the direct coupling between programsAdd IoC container to manage objects in a unified way and make object association ...

Posted by noginn on Wed, 09 Feb 2022 13:48:15 +0100

Spring's @ Async annotation implements asynchronous methods

@Async annotationSpring 3 began to provide @ Async annotation, which can be marked on methods or classes, so as to facilitate the asynchronous invocation of methods. The caller will return immediately when calling the asynchronous method, and the actual execution of the method will be submitted to the thread execution in the specified thread po ...

Posted by rnintulsa on Wed, 09 Feb 2022 12:45:03 +0100

Spring 07 -- integrating Mybatis and declarative transactions

1, Integrate Mybatis Mybatis spring new package Environment construction <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scope>test</scope> </dependency&g ...

Posted by Buyocat on Wed, 09 Feb 2022 03:45:10 +0100

Detailed explanation of Spring transaction propagation behavior

https://www.cnblogs.com/alimayun/p/10933289.html Detailed explanation of Spring transaction propagation behavior </h2> <div id="cnblogs_post_body" class="blogpost-body blogpost-body-html"> preface Spring specifies seven types of transaction propagation behaviors in the TransactionDefinition interface. Tr ...

Posted by sri.sjc on Wed, 09 Feb 2022 00:37:18 +0100

Pure handwriting implementation of Spring source code framework

In the previous article, we completed the loading object defined by Bean. This time, we completed the scope to obtain the value value, write the metadata and set the BeanName scope system Define scope source data class ScopeMetadata /** * Define scope source data class */ public class ScopeMetadata { //Define the default values for the ...

Posted by vaavi8r on Tue, 08 Feb 2022 23:25:57 +0100