mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Polishing
This commit is contained in:
@@ -59,13 +59,13 @@ class ProxyHintsTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
void registerJdkProxyWithSupplier() {
|
||||
void registerJdkProxyWithConsumer() {
|
||||
this.proxyHints.registerJdkProxy(springProxy(TypeReference.of("com.example.Test")));
|
||||
assertThat(this.proxyHints.jdkProxies()).singleElement().satisfies(proxiedInterfaces(
|
||||
"com.example.Test",
|
||||
"org.springframework.aop.SpringProxy",
|
||||
"org.springframework.aop.framework.Advised",
|
||||
"org.springframework.core.DecoratingProxy",
|
||||
"com.example.Test"));
|
||||
"org.springframework.core.DecoratingProxy"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -102,10 +102,11 @@ class ProxyHintsTests {
|
||||
}
|
||||
|
||||
private static Consumer<JdkProxyHint.Builder> springProxy(TypeReference proxiedInterface) {
|
||||
return builder -> builder.proxiedInterfaces(Stream.of("org.springframework.aop.SpringProxy",
|
||||
return builder -> builder
|
||||
.proxiedInterfaces(proxiedInterface)
|
||||
.proxiedInterfaces(Stream.of("org.springframework.aop.SpringProxy",
|
||||
"org.springframework.aop.framework.Advised", "org.springframework.core.DecoratingProxy")
|
||||
.map(TypeReference::of).toArray(TypeReference[]::new))
|
||||
.proxiedInterfaces(proxiedInterface);
|
||||
.map(TypeReference::of).toArray(TypeReference[]::new));
|
||||
}
|
||||
|
||||
private Consumer<JdkProxyHint> proxiedInterfaces(String... proxiedInterfaces) {
|
||||
|
||||
Reference in New Issue
Block a user