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