Skip to content

Commit

Permalink
Fix native image for proxy (#14724)
Browse files Browse the repository at this point in the history
Signed-off-by: “JermaineHua” <crazyhzm@gmail.com>
  • Loading branch information
CrazyHZM authored Sep 25, 2024
1 parent a618373 commit 3ba20fb
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,17 @@ private CodeBlock generateStatementForElement(
Class<?> c = referenceElement.getInjectedType();
AotUtils.registerSerializationForService(c, hints);
hints.reflection().registerType(TypeReference.of(c), MemberCategory.INVOKE_PUBLIC_METHODS);
// need to enumerate all interfaces by the proxy
hints.proxies().registerJdkProxy(c, EchoService.class, Destroyable.class);
hints.proxies().registerJdkProxy(c, EchoService.class, Destroyable.class, GenericService.class);
hints.proxies()
.registerJdkProxy(
c,
EchoService.class,
Destroyable.class,
SpringProxy.class,
Advised.class,
DecoratingProxy.class);
hints.proxies()
.registerJdkProxy(
c,
Expand Down

0 comments on commit 3ba20fb

Please sign in to comment.