mirror of
https://github.com/Snailclimb/JavaGuide
synced 2025-06-20 22:17:09 +08:00
Merge pull request #894 from erisonlan/master
jdk动态代理实际使用中,new DebugProxy()代码有误
This commit is contained in:
commit
e584e3b6d8
@ -261,8 +261,7 @@ public class JdkProxyFactory {
|
||||
**5.实际使用**
|
||||
|
||||
```java
|
||||
DebugProxy debugProxy = new DebugProxy(new SmsServiceImpl());
|
||||
SmsService smsService = debugProxy.getProxy(SmsService.class);
|
||||
SmsService smsService = (SmsService) JdkProxyFactory.getProxy(new SmsServiceImpl());
|
||||
smsService.send("java");
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user