|
|
|
@ -223,13 +223,11 @@ class RestartClassLoaderTests {
|
|
|
|
|
new URL[] { this.sampleJarFile.toURI().toURL() }, this.updatedFiles)) {
|
|
|
|
|
new ApplicationContextRunner().withClassLoader(restartClassLoader)
|
|
|
|
|
.withUserConfiguration(ProxyConfiguration.class)
|
|
|
|
|
.run((context) -> {
|
|
|
|
|
assertThat(context).hasNotFailed();
|
|
|
|
|
ExampleTransactional transactional = context.getBean(ExampleTransactional.class);
|
|
|
|
|
assertThat(AopUtils.isCglibProxy(transactional)).isTrue();
|
|
|
|
|
assertThat(transactional.getClass().getClassLoader())
|
|
|
|
|
.isEqualTo(ExampleTransactional.class.getClassLoader());
|
|
|
|
|
});
|
|
|
|
|
.run((context) -> assertThat(context).getBean(ExampleTransactional.class)
|
|
|
|
|
.matches(AopUtils::isCglibProxy)
|
|
|
|
|
.extracting(Object::getClass)
|
|
|
|
|
.extracting(Class::getClassLoader)
|
|
|
|
|
.isEqualTo(ExampleTransactional.class.getClassLoader()));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|