Polishing in HTTP service registry

This commit is contained in:
rstoyanchev
2025-05-01 11:00:20 +01:00
parent 42e854e5ff
commit 67f3ff574f
5 changed files with 67 additions and 61 deletions

View File

@@ -123,13 +123,14 @@ public class RestClientProxyRegistryIntegrationTests {
return className.contains("EchoA");
};
};
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
context.setClassLoader(beanClassLoader);
context.register(ClassUtils.resolveClassName(ListingConfig.class.getName(), beanClassLoader));
context.refresh();
assertThat(context.getBean(ClassUtils.resolveClassName(EchoA.class.getName(), beanClassLoader))
.getClass()
.getClassLoader()).isSameAs(beanClassLoader);
Class<?> echoClass = ClassUtils.resolveClassName(EchoA.class.getName(), beanClassLoader);
assertThat(context.getBean(echoClass).getClass().getClassLoader()).isSameAs(beanClassLoader);
}
private static class ClientConfig {