Facing this issue while trying to upgrade spring from 5.1 to 5.2
@Configuration public class WebMvcConfiguration extends WebMvcConfigurationSupport {
@Override
public RequestMappingHandlerMapping requestMappingHandlerMapping() {
final RequestMappingHandlerMapping handlerMapping = super.requestMappingHandlerMapping();
handlerMapping.setUseSuffixPatternMatch(false);
handlerMapping.setUseTrailingSlashMatch(false);
return handlerMapping;
}
}
This issue is setUseSuffixPatternMatch() method is deprecated from 5.2 version but can be used by giving arguments as false. I have given 'false' as argument but getting this error.
Is there any replacement methods for this methods.
And also I tried to remove setUseSuffixPatternMatch() method but I got this error
[18,66] method requestMappingHandlerMapping in class org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport cannot be applied to given types; [ERROR] required: org.springframework.web.accept.ContentNegotiationManager,org.springframework.format.support.FormattingConversionService,org.springframework.web.servlet.resource.ResourceUrlProvider
I'm not understanding why requestMappingHandlerMapping is not working when I try to upgrade spring 5.1 to 5.2