|
@@ -7,42 +7,17 @@ import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; |
|
@@ -7,42 +7,17 @@ import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin; |
7
|
import org.springframework.beans.factory.annotation.Autowired;
|
7
|
import org.springframework.beans.factory.annotation.Autowired;
|
8
|
import org.springframework.context.annotation.Bean;
|
8
|
import org.springframework.context.annotation.Bean;
|
9
|
import org.springframework.context.annotation.Configuration;
|
9
|
import org.springframework.context.annotation.Configuration;
|
10
|
-import springfox.documentation.builders.ApiInfoBuilder;
|
|
|
11
|
-import springfox.documentation.builders.PathSelectors;
|
|
|
12
|
-import springfox.documentation.builders.RequestHandlerSelectors;
|
|
|
13
|
-import springfox.documentation.spi.DocumentationType;
|
|
|
14
|
-import springfox.documentation.spring.web.plugins.Docket;
|
|
|
15
|
-import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
|
|
16
|
-//import springfox.documentation.service.ApiInfo;
|
10
|
+
|
17
|
import java.sql.Timestamp;
|
11
|
import java.sql.Timestamp;
|
18
|
|
12
|
|
|
|
13
|
+//import springfox.documentation.service.ApiInfo;
|
|
|
14
|
+
|
19
|
/**
|
15
|
/**
|
20
|
* swagger-ui的配置
|
16
|
* swagger-ui的配置
|
21
|
*/
|
17
|
*/
|
22
|
@Configuration
|
18
|
@Configuration
|
23
|
@EnableSwagger
|
19
|
@EnableSwagger
|
24
|
public class SwaggerConfig {
|
20
|
public class SwaggerConfig {
|
25
|
-// @Bean
|
|
|
26
|
-// public Docket createRestApi() {
|
|
|
27
|
-// return new Docket(DocumentationType.SWAGGER_2)
|
|
|
28
|
-// .apiInfo(apiInfo())
|
|
|
29
|
-// .select()
|
|
|
30
|
-// .apis(RequestHandlerSelectors.basePackage("com.xkl.controller"))
|
|
|
31
|
-// .paths(PathSelectors.any())
|
|
|
32
|
-// .build();
|
|
|
33
|
-// }
|
|
|
34
|
-//
|
|
|
35
|
-// private ApiInfo apiInfo() {
|
|
|
36
|
-// return new ApiInfoBuilder()
|
|
|
37
|
-// .title("Spring Boot中使用Swagger2构建RESTful APIs")
|
|
|
38
|
-// .description("更多Spring Boot相关文章请关注:http://blog.didispace.com/")
|
|
|
39
|
-// .termsOfServiceUrl("http://blog.didispace.com/")
|
|
|
40
|
-// .contact("程序猿DD").version("1.0")
|
|
|
41
|
-// .build();
|
|
|
42
|
-// }
|
|
|
43
|
-//
|
|
|
44
|
-//
|
|
|
45
|
-//}
|
|
|
46
|
|
21
|
|
47
|
private SpringSwaggerConfig springSwaggerConfig;
|
22
|
private SpringSwaggerConfig springSwaggerConfig;
|
48
|
|
23
|
|