parent
8971fb953d
commit
69cbe12a7b
|
@ -119,8 +119,10 @@ public final class AuthorizeReturnObjectHintsRegistrar implements SecurityHintsR
|
|||
}
|
||||
if (SpringProxy.class.isAssignableFrom(proxied)) {
|
||||
hints.reflection()
|
||||
.registerType(proxied, MemberCategory.INVOKE_PUBLIC_METHODS, MemberCategory.PUBLIC_FIELDS,
|
||||
MemberCategory.DECLARED_FIELDS);
|
||||
.registerType(clazz, MemberCategory.INVOKE_DECLARED_CONSTRUCTORS,
|
||||
MemberCategory.INVOKE_DECLARED_METHODS)
|
||||
.registerType(proxied, MemberCategory.INVOKE_DECLARED_CONSTRUCTORS,
|
||||
MemberCategory.INVOKE_DECLARED_METHODS, MemberCategory.DECLARED_FIELDS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -46,8 +46,9 @@ public class AuthorizeReturnObjectCoreHintsRegistrarTests {
|
|||
context.refresh();
|
||||
RuntimeHints hints = new RuntimeHints();
|
||||
this.registrar.registerHints(hints, context.getBeanFactory());
|
||||
assertThat(hints.reflection().typeHints().map((hint) -> hint.getType().getName()))
|
||||
.containsOnly(cglibClassName(MyObject.class), cglibClassName(MySubObject.class));
|
||||
assertThat(hints.reflection().typeHints().map((hint) -> hint.getType().getName())).containsOnly(
|
||||
cglibClassName(MyObject.class), cglibClassName(MySubObject.class), MyObject.class.getName(),
|
||||
MySubObject.class.getName());
|
||||
assertThat(hints.proxies()
|
||||
.jdkProxyHints()
|
||||
.flatMap((hint) -> hint.getProxiedInterfaces().stream())
|
||||
|
|
|
@ -40,7 +40,7 @@ public class AuthorizeReturnObjectHintsRegistrarTests {
|
|||
RuntimeHints hints = new RuntimeHints();
|
||||
registrar.registerHints(hints, null);
|
||||
assertThat(hints.reflection().typeHints().map((hint) -> hint.getType().getName()))
|
||||
.containsOnly(cglibClassName(MyObject.class));
|
||||
.containsOnly(cglibClassName(MyObject.class), MyObject.class.getName());
|
||||
assertThat(hints.proxies()
|
||||
.jdkProxyHints()
|
||||
.flatMap((hint) -> hint.getProxiedInterfaces().stream())
|
||||
|
|
Loading…
Reference in New Issue