What Dynamic proxies are? Scenarios?

What Dynamic proxies are? Scenarios?

Dynamic Agent: At runtime, the target class is created, you can call the target class and method of expansion.

Java, dynamic way: dynamic agent in the JDK  and Java class libraries CGLib .

 

Scenarios such as:

  • Api request statistics for each time-consuming
  • Unified log output
  • Whether the check is called api login and permissions have been identified
  • Spring's AOP function module is the use of dynamic proxy mechanism to implement the aspect of programming

 

Details can refer to my column: the Java proxy

                      

Guess you like

Origin blog.csdn.net/meism5/article/details/90413993