diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerAutoConfigurationTests.java index e6f666513a0..ae987c4bc31 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/servlet/OAuth2ResourceServerAutoConfigurationTests.java @@ -28,6 +28,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.nimbusds.jose.JWSAlgorithm; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; +import org.assertj.core.api.InstanceOfAssertFactories; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; @@ -99,7 +100,9 @@ class OAuth2ResourceServerAutoConfigurationTests { JwtDecoder jwtDecoder = context.getBean(JwtDecoder.class); Object processor = ReflectionTestUtils.getField(jwtDecoder, "jwtProcessor"); Object keySelector = ReflectionTestUtils.getField(processor, "jwsKeySelector"); - assertThat(keySelector).hasFieldOrPropertyWithValue("jwsAlg", JWSAlgorithm.RS256); + assertThat(keySelector) + .extracting("jwsAlgs", InstanceOfAssertFactories.iterable(JWSAlgorithm.class)) + .containsExactly(JWSAlgorithm.RS256); }); } @@ -112,7 +115,9 @@ class OAuth2ResourceServerAutoConfigurationTests { JwtDecoder jwtDecoder = context.getBean(JwtDecoder.class); Object processor = ReflectionTestUtils.getField(jwtDecoder, "jwtProcessor"); Object keySelector = ReflectionTestUtils.getField(processor, "jwsKeySelector"); - assertThat(keySelector).hasFieldOrPropertyWithValue("jwsAlg", JWSAlgorithm.RS384); + assertThat(keySelector) + .extracting("jwsAlgs", InstanceOfAssertFactories.iterable(JWSAlgorithm.class)) + .containsExactly(JWSAlgorithm.RS384); assertThat(getBearerTokenFilter(context)).isNotNull(); }); } diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 7aa96b6a143..fd63f55138c 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1738,7 +1738,7 @@ bom { ] } } - library("Spring Security", "5.3.2.RELEASE") { + library("Spring Security", "5.3.3.RELEASE") { group("org.springframework.security") { imports = [ "spring-security-bom"