Authored by zhaoyue

Upsoft pass testing, fix little bug

@@ -51,16 +51,6 @@ @@ -51,16 +51,6 @@
51 <artifactId>swagger-springmvc</artifactId> 51 <artifactId>swagger-springmvc</artifactId>
52 <version>1.0.0</version> 52 <version>1.0.0</version>
53 </dependency> 53 </dependency>
54 - <dependency>  
55 - <groupId>io.springfox</groupId>  
56 - <artifactId>springfox-swagger2</artifactId>  
57 - <version>2.4.0</version>  
58 - </dependency>  
59 - <dependency>  
60 - <groupId>io.springfox</groupId>  
61 - <artifactId>springfox-swagger-ui</artifactId>  
62 - <version>2.4.0</version>  
63 - </dependency>  
64 54
65 <dependency> 55 <dependency>
66 <groupId>oro</groupId> 56 <groupId>oro</groupId>
1 git add --all src/* 1 git add --all src/*
2 git add push.sh 2 git add push.sh
3 git add pom.xml 3 git add pom.xml
4 -git commit -m "Upsoft pass testing" 4 +git commit -m "Upsoft pass testing, fix little bug"
5 git push origin zhaoyue-dev2 5 git push origin zhaoyue-dev2
6 git status 6 git status
@@ -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
@@ -56,7 +31,7 @@ public class SwaggerConfig { @@ -56,7 +31,7 @@ public class SwaggerConfig {
56 return new SwaggerSpringMvcPlugin(this.springSwaggerConfig) 31 return new SwaggerSpringMvcPlugin(this.springSwaggerConfig)
57 .apiInfo(new ApiInfo("xkl RESTful Api", 32 .apiInfo(new ApiInfo("xkl RESTful Api",
58 null, null, null, null, null)). 33 null, null, null, null, null)).
59 - //将Timestamp类型全部转为Long类型 34 + //将Timestamp类型全部转为Long类型
60 directModelSubstitute(Timestamp.class, Long.class); 35 directModelSubstitute(Timestamp.class, Long.class);
61 } 36 }
62 37