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