Skip to content

Commit

Permalink
Fix native image for proxy
Browse files Browse the repository at this point in the history
Signed-off-by: “JermaineHua” <[email protected]>
  • Loading branch information
CrazyHZM committed Sep 25, 2024
1 parent 67d3753 commit c804dbb
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 c804dbb

Please sign in to comment.