Update HandlerMappingIntrospector Usage in CORS support

Closes gh-16501

Signed-off-by: Evgeniy Cheban <mister.cheban@gmail.com>
This commit is contained in:
Evgeniy Cheban
2025-02-26 21:47:45 +02:00
committed by Josh Cummings
parent ba1045e61d
commit ad1ee28f01
3 changed files with 11 additions and 10 deletions

View File

@@ -70,7 +70,8 @@ public class CorsConfigurerTests {
assertThatExceptionOfType(BeanCreationException.class)
.isThrownBy(() -> this.spring.register(DefaultCorsConfig.class).autowire())
.withMessageContaining(
"Please ensure Spring Security & Spring MVC are configured in a shared ApplicationContext");
"Please ensure that you are using `@EnableWebMvc`, are publishing a `WebMvcConfigurer`, "
+ "or are publishing a `CorsConfigurationSource` bean.");
}
@Test