@ -33,6 +33,7 @@ import org.springframework.beans.factory.ListableBeanFactory;
import org.springframework.beans.factory.NoSuchBeanDefinitionException ;
import org.springframework.beans.factory.NoSuchBeanDefinitionException ;
import org.springframework.beans.factory.ObjectProvider ;
import org.springframework.beans.factory.ObjectProvider ;
import org.springframework.beans.factory.annotation.Autowired ;
import org.springframework.beans.factory.annotation.Autowired ;
import org.springframework.beans.factory.annotation.Qualifier ;
import org.springframework.boot.autoconfigure.AutoConfigureAfter ;
import org.springframework.boot.autoconfigure.AutoConfigureAfter ;
import org.springframework.boot.autoconfigure.AutoConfigureOrder ;
import org.springframework.boot.autoconfigure.AutoConfigureOrder ;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration ;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration ;
@ -362,10 +363,11 @@ public class WebMvcAutoConfiguration {
@Bean
@Bean
@Override
@Override
public RequestMappingHandlerAdapter requestMappingHandlerAdapter (
public RequestMappingHandlerAdapter requestMappingHandlerAdapter (
ContentNegotiationManager mvcContentNegotiationManager ,
@Qualifier ( "mvcContentNegotiationManager" ) ContentNegotiationManager contentNegotiationManager ,
FormattingConversionService mvcConversionService , Validator mvcValidator ) {
@Qualifier ( "mvcConversionService" ) FormattingConversionService conversionService ,
RequestMappingHandlerAdapter adapter = super . requestMappingHandlerAdapter ( mvcContentNegotiationManager ,
@Qualifier ( "mvcValidator" ) Validator validator ) {
mvcConversionService , mvcValidator ) ;
RequestMappingHandlerAdapter adapter = super . requestMappingHandlerAdapter ( contentNegotiationManager ,
conversionService , validator ) ;
adapter . setIgnoreDefaultModelOnRedirect (
adapter . setIgnoreDefaultModelOnRedirect (
this . mvcProperties = = null | | this . mvcProperties . isIgnoreDefaultModelOnRedirect ( ) ) ;
this . mvcProperties = = null | | this . mvcProperties . isIgnoreDefaultModelOnRedirect ( ) ) ;
return adapter ;
return adapter ;
@ -383,11 +385,12 @@ public class WebMvcAutoConfiguration {
@Primary
@Primary
@Override
@Override
public RequestMappingHandlerMapping requestMappingHandlerMapping (
public RequestMappingHandlerMapping requestMappingHandlerMapping (
ContentNegotiationManager mvcContentNegotiationManager ,
@Qualifier ( "mvcContentNegotiationManager" ) ContentNegotiationManager contentNegotiationManager ,
FormattingConversionService mvcConversionService , ResourceUrlProvider mvcResourceUrlProvider ) {
@Qualifier ( "mvcConversionService" ) FormattingConversionService conversionService ,
@Qualifier ( "mvcResourceUrlProvider" ) ResourceUrlProvider resourceUrlProvider ) {
// Must be @Primary for MvcUriComponentsBuilder to work
// Must be @Primary for MvcUriComponentsBuilder to work
return super . requestMappingHandlerMapping ( mv cC ontentNegotiationManager, mv cC onversionService,
return super . requestMappingHandlerMapping ( contentNegotiationManager, conversionService,
mvcR esourceUrlProvider) ;
r esourceUrlProvider) ;
}
}
@Bean
@Bean