Avoid inheritance in configuration classes

This commit restructures configuration classes to avoid inheritance, where possible. This should provide more flexibility when composing custom configurations.

Closes gh-1415
This commit is contained in:
Vedran Pavic
2022-10-17 19:33:21 +02:00
committed by Rob Winch
parent fc81049cbe
commit 668f85788a
8 changed files with 24 additions and 16 deletions

View File

@@ -191,7 +191,7 @@ class RedisWebSessionConfigurationTests {
void multipleConnectionFactoryRedisConfig() {
assertThatExceptionOfType(BeanCreationException.class)
.isThrownBy(() -> registerAndRefresh(RedisConfig.class, MultipleConnectionFactoryRedisConfig.class))
.withCauseInstanceOf(NoUniqueBeanDefinitionException.class).havingCause()
.havingRootCause().isInstanceOf(NoUniqueBeanDefinitionException.class)
.withMessageContaining("expected single matching bean but found 2");
}