1
0
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:
SnailClimb 2020-08-23 09:54:37 +08:00 committed by GitHub
commit e584e3b6d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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");
```