Dynamic proxy static proxy implementation steps

First write an interface

usbsell

Let factories and businesses implement this interface separately

 

 Manufacturer implementation class

 Merchant implementation class

Final purchase test category

 In the end, the buyer bought the product through the merchant but did not touch the factory.

Guess you like

Origin blog.csdn.net/qq_35677589/article/details/112334815