Restructure BeanOverrideBeanFactoryPostProcessor and improve documentation

This commit is contained in:
Sam Brannen
2024-09-27 17:01:06 +02:00
parent ea8b8ae910
commit bed3025274
2 changed files with 92 additions and 77 deletions

View File

@@ -40,9 +40,9 @@ class MockitoSpyBeanTests {
assertThatIllegalStateException()
.isThrownBy(context::refresh)
.withMessage("""
Unable to override bean 'beanToSpy' by wrapping: \
there is no existing bean instance with that name of type %s""".formatted(
String.class.getName()));
Unable to override bean by wrapping: \
there is no existing bean definition with name [beanToSpy] and type [%s].""",
String.class.getName());
}
@Test