package tk.antoine_roux.wiki.configuration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.format.support.FormattingConversionService; import org.springframework.web.accept.ContentNegotiationManager; import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping; import org.springframework.web.servlet.resource.ResourceUrlProvider; import tk.antoine_roux.wiki.Constant; /** * spring web configuration */ @Configuration(proxyBeanMethods = false) public class WebConfiguration extends WebMvcConfigurationSupport { @Bean @Override public RequestMappingHandlerMapping requestMappingHandlerMapping(ContentNegotiationManager contentNegotiationManager, FormattingConversionService conversionService, ResourceUrlProvider resourceUrlProvider) { return new ApiVersionRequestMappingHandlerMapping(Constant.VERSION_PREFIX); } }