merge
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package com.xwbing.demo;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
|
||||
/**
|
||||
* 项目名称: boot-module-demo
|
||||
@@ -11,9 +11,23 @@ import java.util.Map;
|
||||
*/
|
||||
public class demo {
|
||||
public static void main(String[] args) {
|
||||
Map<String, String> map = new HashMap<>();
|
||||
String s = map.get(null);
|
||||
System.out.println("");
|
||||
|
||||
ArrayList<Integer> objects = new ArrayList<>();
|
||||
long l2 = System.currentTimeMillis();
|
||||
for (int i=0;i<1000000;i++){
|
||||
objects.add(i);
|
||||
}
|
||||
long l3 = System.currentTimeMillis();
|
||||
System.out.println(l3-l2);
|
||||
|
||||
LinkedList<Integer> list = new LinkedList<>();
|
||||
long l = System.currentTimeMillis();
|
||||
for (int i=0;i<1000000;i++){
|
||||
list.add(i);
|
||||
}
|
||||
long l1 = System.currentTimeMillis();
|
||||
System.out.println(l1-l);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -21,19 +21,41 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
@EnableSwagger2
|
||||
public class SwaggerConfig {
|
||||
@Bean
|
||||
public Docket buildDocket() {
|
||||
public Docket sysDocket() {
|
||||
return new Docket(DocumentationType.SWAGGER_2)
|
||||
.apiInfo(buildApiInf())
|
||||
.groupName("system")
|
||||
.apiInfo(sysApiInf())
|
||||
.select()
|
||||
.apis(RequestHandlerSelectors.basePackage("com.xwbing.controller"))//controller路径
|
||||
.apis(RequestHandlerSelectors.basePackage("com.xwbing.controller.sys"))
|
||||
.paths(PathSelectors.any())
|
||||
.build();
|
||||
}
|
||||
|
||||
private ApiInfo buildApiInf() {
|
||||
private ApiInfo sysApiInf() {
|
||||
return new ApiInfoBuilder()
|
||||
.title("Document RESTful APIs")
|
||||
.description("API接口文档")
|
||||
.description("系统接口文档")
|
||||
.termsOfServiceUrl("http://localhost:8080/swagger-ui.html")
|
||||
.contact(new Contact("项伟兵", "https://github.com/xiangwbs/boot-module-demo.git", "xiangwbs@163.com"))
|
||||
.version("1.0.0")
|
||||
.build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Docket otherDocket() {
|
||||
return new Docket(DocumentationType.SWAGGER_2)
|
||||
.groupName("other")
|
||||
.apiInfo(otherApiInf())
|
||||
.select()
|
||||
.apis(RequestHandlerSelectors.basePackage("com.xwbing.controller.other"))
|
||||
.paths(PathSelectors.any())
|
||||
.build();
|
||||
}
|
||||
|
||||
private ApiInfo otherApiInf() {
|
||||
return new ApiInfoBuilder()
|
||||
.title("Document RESTful APIs")
|
||||
.description("other接口文档")
|
||||
.termsOfServiceUrl("http://localhost:8080/swagger-ui.html")
|
||||
.contact(new Contact("项伟兵", "https://github.com/xiangwbs/boot-module-demo.git", "xiangwbs@163.com"))
|
||||
.version("1.0.0")
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.xwbing.controller;
|
||||
package com.xwbing.controller.other;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.xwbing.annotation.LogInfo;
|
||||
Reference in New Issue
Block a user