Skip to content

Commit da96eea

Browse files
committed
Remove redundant requestMappingHandlerMapping override
The bean no longer needs to be primary so the override is not needed any more. Closes gh-29682
1 parent 15da07a commit da96eea

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@
6666
import org.springframework.context.annotation.Bean;
6767
import org.springframework.context.annotation.Configuration;
6868
import org.springframework.context.annotation.Import;
69-
import org.springframework.context.annotation.Primary;
7069
import org.springframework.core.Ordered;
7170
import org.springframework.core.annotation.Order;
7271
import org.springframework.core.io.Resource;
@@ -435,18 +434,6 @@ protected RequestMappingHandlerAdapter createRequestMappingHandlerAdapter() {
435434
return super.createRequestMappingHandlerAdapter();
436435
}
437436

438-
@Bean
439-
@Primary
440-
@Override
441-
public RequestMappingHandlerMapping requestMappingHandlerMapping(
442-
@Qualifier("mvcContentNegotiationManager") ContentNegotiationManager contentNegotiationManager,
443-
@Qualifier("mvcConversionService") FormattingConversionService conversionService,
444-
@Qualifier("mvcResourceUrlProvider") ResourceUrlProvider resourceUrlProvider) {
445-
// Must be @Primary for MvcUriComponentsBuilder to work
446-
return super.requestMappingHandlerMapping(contentNegotiationManager, conversionService,
447-
resourceUrlProvider);
448-
}
449-
450437
@Bean
451438
public WelcomePageHandlerMapping welcomePageHandlerMapping(ApplicationContext applicationContext,
452439
FormattingConversionService mvcConversionService, ResourceUrlProvider mvcResourceUrlProvider) {

0 commit comments

Comments
 (0)