1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-16 18:10:13 +08:00

jdk动态代理实际使用中,new DebugProxy()代码有误

jdk动态代理实际使用中,new DebugProxy()代码有误
This commit is contained in:
erisonlan 2020-08-15 11:06:35 +08:00 committed by GitHub
parent c254fcee0d
commit 218d095a17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -261,8 +261,7 @@ public class JdkProxyFactory {
**5.实际使用** **5.实际使用**
```java ```java
DebugProxy debugProxy = new DebugProxy(new SmsServiceImpl()); SmsService smsService = (SmsService) JdkProxyFactory.getProxy(new SmsServiceImpl());
SmsService smsService = debugProxy.getProxy(SmsService.class);
smsService.send("java"); smsService.send("java");
``` ```