cglib create proxy object

MethodProxy call analysis The beginning of the code starts with the example in the first article. I won't post the code. Look directly at MethodProxy It is an input parameter in the MethodInterceptor, through which you can call the original method, the method of the parent class, or different objects of the same type. The point is the last o ...

Added by englishman69 on Fri, 24 Dec 2021 18:24:15 +0200

Is AOP in Spring Boot JDK dynamic proxy or Cglib dynamic proxy?

As we all know, the underlying layer of AOP is dynamic agent, and there are two ways to implement dynamic agent in Java: Dynamic agent based on JDK Dynamic agent based on Cglib The biggest difference between the two is that the JDK based dynamic proxy needs the proxy object to have an interface, while the Cglib based dynamic proxy does not ...

Added by knowram on Fri, 24 Dec 2021 14:00:59 +0200

Simple use of AOP in Spring

Although the road is endless and faraway, I still want to pursue the truth in the world. AOP Aspect Oriented Programming means Aspect Oriented Programming, which may be because java's object-oriented programming is used to reduce duplicate code and coupling when dealing with log, authorization and other operations Therefore, a concept of aspe ...

Added by ego0 on Fri, 24 Dec 2021 09:29:16 +0200

Probably the most voluminous Spring source code series: circular dependency

I've read too many articles about circular dependency. I feel that most of them only talk about how circular dependency is implemented. For the time being, I haven't seen any articles that can really explain why L3 cache is used. In order to better analyze the code received by spring, this article is arranged first. Definition of cache level ...

Added by jpr on Fri, 24 Dec 2021 09:11:17 +0200

Resttemplate -- the postforobject method passes the object directly

1. We passed http://start.spring.io/ Initialize a simple spring boot project named RestTemplate. Since only RestTemplate features are studied, only web can be added, as shown in the figure. In addition, alibaba.com is added to this project Fastjson is a jar package that you need in POM XML add dependency   <!--Ali FastJson rely on--> ...

Added by jason97673 on Fri, 24 Dec 2021 02:50:25 +0200

Probably the most voluminous spring source code series: events in spring

Spring implements the function of time subscription and publication, so when using spring, you no longer need to implement it yourself or use the observer mode of jdk. You can use the subscription and publication function of spring. This article will analyze the implementation of events in spring from the perspective of source code Observer mo ...

Added by Ali25m on Thu, 23 Dec 2021 22:34:43 +0200

Spring scheduled task - @ Schedule annotation details

1, @ Schedule annotation list @The Scheduled annotation has 8 attributes (3 of which are the same configurations of different types) and a constant CRON_DISABLED. The source code is as follows: /** * Marks the comment for the method to schedule. One of the cron, fixedDelay, or fixedRate properties must be specified exactly. Annotated methods ...

Added by Daniel Exe on Thu, 23 Dec 2021 20:25:45 +0200

Spring Bean creation process

1. Entry created by bean There is this in the refresh() method of AbstractApplicationContext Finishbeanfactoryinitialization (beanfactory) method In this method, the preInstantiateSingletons() method of DefaultListableBeanFactory is invoked, which initializes all non delayed loading Bean instances. The preInstantiateSingletons() method will ...

Added by jandrews3 on Thu, 23 Dec 2021 17:36:27 +0200

shiro licensing and annotated development

1, Authorization 1. Grant roles to users ① Get the account ② Get the granted role through the user account ③ Give these roles to shiro for management 2. Grant permissions to users ① Get the account ② Get the visible granted permissions through the user account ③ Give these permissions to shiro for management First, in shirousermapper N ...

Added by Mindwreck on Thu, 23 Dec 2021 14:30:17 +0200

Architecture learning path

brief introduction Architecture: software architecture is an abstract description of the overall software architecture and components, which is used to guide the design of all aspects of large-scale software systems; Excellent performance, strong TPS/QPS carrying capacity and high availability determine how much PV traffic you can support; du ...

Added by dast on Thu, 23 Dec 2021 08:46:37 +0200