|
|
@@ -6,11 +6,6 @@ import org.springframework.context.annotation.Configuration;
|
|
|
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
|
|
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
|
-import springfox.documentation.builders.ApiInfoBuilder;
|
|
|
-import springfox.documentation.builders.PathSelectors;
|
|
|
-import springfox.documentation.builders.RequestHandlerSelectors;
|
|
|
-import springfox.documentation.spi.DocumentationType;
|
|
|
-import springfox.documentation.spring.web.plugins.Docket;
|
|
|
|
|
|
@Configuration
|
|
|
public class WebMvcConfig implements WebMvcConfigurer {
|
|
|
@@ -27,20 +22,20 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
|
|
registry.addResourceHandler("/MP_verify*").addResourceLocations("classpath:/");
|
|
|
}
|
|
|
|
|
|
- @Bean
|
|
|
- public Docket createApi() {
|
|
|
- return new Docket(DocumentationType.SWAGGER_2)
|
|
|
- .apiInfo(new ApiInfoBuilder()
|
|
|
- .title("接口文档")
|
|
|
- .version("1.0.0")
|
|
|
- .termsOfServiceUrl("#")
|
|
|
- .description("接口文档")
|
|
|
- .build())
|
|
|
- .select()
|
|
|
- .apis(RequestHandlerSelectors.basePackage("com.izouma.awesomeAdmin.web"))
|
|
|
- .paths(PathSelectors.any())
|
|
|
- .build();
|
|
|
- }
|
|
|
+// @Bean
|
|
|
+// public Docket createApi() {
|
|
|
+// return new Docket(DocumentationType.SWAGGER_2)
|
|
|
+// .apiInfo(new ApiInfoBuilder()
|
|
|
+// .title("接口文档")
|
|
|
+// .version("1.0.0")
|
|
|
+// .termsOfServiceUrl("#")
|
|
|
+// .description("接口文档")
|
|
|
+// .build())
|
|
|
+// .select()
|
|
|
+// .apis(RequestHandlerSelectors.basePackage("com.izouma.awesomeAdmin.web"))
|
|
|
+// .paths(PathSelectors.any())
|
|
|
+// .build();
|
|
|
+// }
|
|
|
|
|
|
// @Bean
|
|
|
// public MappingJackson2HttpMessageConverter getMappingJackson2HttpMessageConverter() {
|
|
|
@@ -70,6 +65,7 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
|
|
.allowedHeaders("*")
|
|
|
.allowCredentials(true)
|
|
|
.allowedMethods("HEAD", "GET", "PUT", "POST", "DELETE", "PATCH")
|
|
|
+ .allowedOrigins("http://10.5.23.169")
|
|
|
.exposedHeaders("Content-Disposition");
|
|
|
}
|
|
|
|