2020-09-10 18:03:50 +00:00
|
|
|
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
|
|
|
|
*/
|
2020-09-10 21:02:49 +00:00
|
|
|
@Configuration(proxyBeanMethods = false)
|
2020-09-10 18:03:50 +00:00
|
|
|
public class WebConfiguration extends WebMvcConfigurationSupport {
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
@Override
|
|
|
|
public RequestMappingHandlerMapping requestMappingHandlerMapping(ContentNegotiationManager contentNegotiationManager,
|
|
|
|
FormattingConversionService conversionService,
|
|
|
|
ResourceUrlProvider resourceUrlProvider) {
|
|
|
|
return new ApiVersionRequestMappingHandlerMapping(Constant.VERSION_PREFIX);
|
|
|
|
}
|
|
|
|
}
|