package com.yuchen.saas.park.service.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * @author 吕海泉
 * @create 2020/12/22 12:01
 */
@Deprecated // modify by qianjiang 2022.9.24 功能不明确代码
@Configuration
public class WebMvcConfig extends WebMvcConfigurerAdapter {
//    @Bean
//    public Docket api() {
//        return new Docket(DocumentationType.SWAGGER_2)
//                .select()
////                .apis(RequestHandlerSelectors.basePackage("com.example.rest"))
//                .paths(PathSelectors.any())
//                .build();
//    }
      @Override
      public void addResourceHandlers(ResourceHandlerRegistry registry) {
                 registry.addResourceHandler("swagger-ui.html")
                         .addResourceLocations("classpath:/META-INF/resources/");

                 registry.addResourceHandler("/webjars/**")
                         .addResourceLocations("classpath:/META-INF/resources/webjars/");
             }
}
