Add getter for RequestMappingInfo.BuilderConfiguration
This improves support for programmatic registration of mappings to use the same config as that of the RequestMappingHandlerMapping. See gh-27723
This commit is contained in:
committed by
Rossen Stoyanchev
parent
0d7c562693
commit
ce0aed216b
@@ -79,6 +79,17 @@ public class RequestMappingHandlerMappingTests {
|
||||
return Stream.of(Arguments.of(mapping1, wac1), Arguments.of(mapping2, wac2));
|
||||
}
|
||||
|
||||
@Test
|
||||
void getRequestMappingInfoBuilderConfiguration() {
|
||||
RequestMappingHandlerMapping handlerMapping = new RequestMappingHandlerMapping();
|
||||
handlerMapping.setApplicationContext(new StaticWebApplicationContext());
|
||||
|
||||
RequestMappingInfo.BuilderConfiguration beforeAfterPropertiesSet = handlerMapping.getRequestMappingInfoBuilderConfiguration();
|
||||
assertThat(beforeAfterPropertiesSet).isNotNull();
|
||||
handlerMapping.afterPropertiesSet();
|
||||
RequestMappingInfo.BuilderConfiguration afterPropertiesSet = handlerMapping.getRequestMappingInfoBuilderConfiguration();
|
||||
assertThat(afterPropertiesSet).isNotNull().isNotSameAs(beforeAfterPropertiesSet);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("deprecation")
|
||||
|
||||
Reference in New Issue
Block a user