Architect's Inner Work, the most complex of the 23 design patterns for visitors

Visitor Pattern is a design pattern that separates data structure from data operation.It refers to the encapsulation of operations that act on various elements in a data structure. It can define new operations that act on these elements without changing the data structure. Visitor mode is called the most complex design mode and is not used freq ...

Posted by A JM on Sun, 29 Mar 2020 21:03:38 -0700

IoC container initialization of spring framework

Analysis example Startup class Application, using ClassPathXmlApplicationContext to load xml files /** * @author jianw.li * @date 2020/3/16 11:53 PM * @Description: TODO */ public class MyApplication { private static final String CONFIG_LOCATION = "classpath:application_context.xml"; private static final String BEAN_NAME = "hello"; ...

Posted by eagleweb on Sun, 29 Mar 2020 09:48:58 -0700

Version F spring cloud 4 - Eureka registry development and client development

Source address: https://gitee.com/bingqilinpeishenme/Java-Tutorials Preface In the first three articles, the concepts related to microservices, spring cloud and service governance are introduced in large vernacular, and the development of spring cloud code starts from this article. Spring cloud project environment construction All demo s of ...

Posted by hypedupdawg on Sun, 29 Mar 2020 02:50:24 -0700

docker+springboot+rabbitmq to implement dead letter queue

1. Download and start rabbitmq docker pull hub.c.163.com/library/rabbitmq:3-management docker run -d -p 5672:5672 -p 15672:15672 --name mymq hub.c.163.com/library/rabbitmq:3-management #web access path ip:15672 #User name: guest password: Guest 2. Introduce dependency into the project of springboot <dependency> < ...

Posted by Wolverine68 on Sat, 28 Mar 2020 07:31:46 -0700

Spring Controller singletons and thread-safe things

Catalog singleton scope Prototype Scope Does multiple HTTP requests execute serially or in parallel within the Spring Controller? Implement singleton mode and simulate a large number of concurrent requests to verify thread security Appendix: Spring Bean Scope singleton scope Each controller that adds @RestController or @Controller defaults to ...

Posted by Joshua4550 on Fri, 27 Mar 2020 21:56:23 -0700

Detail the three proxy modes in Java!

Author: Cen Yuhttps://www.cnblogs.com/cenyu/p/6289209.html proxy pattern Proxy is a design pattern that provides additional access to the target object; that is, it accesses the target object through the proxy object. The advantage of this is that you can enhance additional functional operations, that is, extend the capabilities of the target ...

Posted by tlenker09 on Thu, 26 Mar 2020 23:52:48 -0700

Netflix Hystrix service monitoring of Spring Cloud series

Actuator    In addition to service fault tolerance, Hystrix also provides near real-time monitoring function, which collects the service execution results and running indicators, the number of successful requests, etc. through the activator, and then accesses / Actor / Hystrix.stream to see the real-time monitoring data.    Add dependency ...

Posted by roninblade on Wed, 25 Mar 2020 20:10:13 -0700

A comprehensive understanding of Java reflection mechanism

Java's reflection mechanism is ubiquitous in practice. If you have worked for several years and have a little knowledge of Java's reflection mechanism, this article is definitely worth reading. What is reflex Reflection is one of the characteristics of Java. It allows running Java programs to obtain their own information and manipulate the inte ...

Posted by lifeson2112 on Wed, 25 Mar 2020 16:55:01 -0700

Spring Cloud Micro Service Architecture From Getting Started to Getting Used - Service Gateway Authentication

In the previous article, we integrated a service gateway, Spring Cloud Gateway, where all service requests can be accessed through Gateway.We can then authenticate the user's request at the service gateway level to determine whether the routed API interface can be accessed. So let's start with more authentication, and here we're using jwt 1. Cr ...

Posted by Zero20two on Tue, 24 Mar 2020 10:07:39 -0700

sentinel of grpc circuit breaker

background In order to prevent the downstream service avalanche, the use of circuit breakers is considered here Technology selection Due to the spring boot service and the integration of istio, three solutions are considered here istio hystrix sentinel Here are the comparison of these schemes Implementation of microservice circuit breaker mod ...

Posted by EagleAmerican on Tue, 24 Mar 2020 08:02:37 -0700