Use context.getBean() for ClientRegistrationRepository

Fixes gh-5538
This commit is contained in:
Joe Grandja
2018-07-20 09:41:56 -04:00
parent 9a144d742e
commit a4fdc28b27
2 changed files with 2 additions and 13 deletions

View File

@@ -171,8 +171,7 @@ public class OAuth2ClientConfigurationTests {
public void loadContextWhenClientRegistrationRepositoryRegisteredTwiceThenThrowNoUniqueBeanDefinitionException() {
assertThatThrownBy(() -> this.spring.register(ClientRegistrationRepositoryRegisteredTwiceConfig.class).autowire())
.hasRootCauseInstanceOf(NoUniqueBeanDefinitionException.class)
.hasMessageContaining("Expected single matching bean of type '" + ClientRegistrationRepository.class.getName() +
"' but found 2: clientRegistrationRepository1,clientRegistrationRepository2");
.hasMessageContaining("expected single matching bean but found 2: clientRegistrationRepository1,clientRegistrationRepository2");
}
@EnableWebMvc