-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #136 from baiyina/master
- Loading branch information
Showing
22 changed files
with
161 additions
and
169 deletions.
There are no files selected for viewing
75 changes: 33 additions & 42 deletions
75
cim-client/src/main/java/com/crossoverjie/cim/client/config/SwaggerConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,33 @@ | ||
//package com.crossoverjie.cim.client.config; | ||
// | ||
//import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; | ||
//import org.springframework.context.annotation.Bean; | ||
//import org.springframework.context.annotation.Configuration; | ||
//import springfox.documentation.builders.ApiInfoBuilder; | ||
//import springfox.documentation.builders.PathSelectors; | ||
//import springfox.documentation.builders.RequestHandlerSelectors; | ||
//import springfox.documentation.service.ApiInfo; | ||
//import springfox.documentation.spi.DocumentationType; | ||
//import springfox.documentation.spring.web.plugins.Docket; | ||
//import springfox.documentation.swagger2.annotations.EnableSwagger2; | ||
// | ||
// | ||
//@Configuration | ||
//@EnableSwagger2 | ||
///** 是否打开swagger **/ | ||
//@ConditionalOnExpression("'${swagger.enable}' == 'true'") | ||
//public class SwaggerConfig { | ||
// | ||
// | ||
// @Bean | ||
// public Docket createRestApi() { | ||
// return new Docket(DocumentationType.SWAGGER_2) | ||
// .apiInfo(apiInfo()) | ||
// .select() | ||
// .apis(RequestHandlerSelectors.basePackage("com.crossoverjie.netty.action.client.controller")) | ||
// .paths(PathSelectors.any()) | ||
// .build(); | ||
// } | ||
// | ||
// private ApiInfo apiInfo() { | ||
// return new ApiInfoBuilder() | ||
// .title("sbc order api") | ||
// .description("sbc order api") | ||
// .termsOfServiceUrl("http://crossoverJie.top") | ||
// .contact("crossoverJie") | ||
// .version("1.0.0") | ||
// .build(); | ||
// } | ||
// | ||
//} | ||
package com.crossoverjie.cim.client.config; | ||
|
||
import io.swagger.v3.oas.models.OpenAPI; | ||
import io.swagger.v3.oas.models.info.Contact; | ||
import io.swagger.v3.oas.models.info.Info; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
|
||
@Configuration | ||
public class SwaggerConfig { | ||
|
||
@Bean | ||
public OpenAPI createRestApi() { | ||
return new OpenAPI() | ||
.info(apiInfo()); | ||
} | ||
|
||
private Info apiInfo() { | ||
return new Info() | ||
.title("cim client") | ||
.description("cim client api") | ||
.termsOfService("http://crossoverJie.top") | ||
.contact(contact()) | ||
.version("1.0.0"); | ||
} | ||
|
||
private Contact contact () { | ||
Contact contact = new Contact(); | ||
contact.setName("crossoverJie"); | ||
return contact; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 31 additions & 42 deletions
73
cim-forward-route/src/main/java/com/crossoverjie/cim/route/config/SwaggerConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,31 @@ | ||
//package com.crossoverjie.cim.route.config; | ||
// | ||
//import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; | ||
//import org.springframework.context.annotation.Bean; | ||
//import org.springframework.context.annotation.Configuration; | ||
//import springfox.documentation.builders.ApiInfoBuilder; | ||
//import springfox.documentation.builders.PathSelectors; | ||
//import springfox.documentation.builders.RequestHandlerSelectors; | ||
//import springfox.documentation.service.ApiInfo; | ||
//import springfox.documentation.spi.DocumentationType; | ||
//import springfox.documentation.spring.web.plugins.Docket; | ||
//import springfox.documentation.swagger2.annotations.EnableSwagger2; | ||
// | ||
// | ||
//@Configuration | ||
//@EnableSwagger2 | ||
///** 是否打开swagger **/ | ||
//@ConditionalOnExpression("'${swagger.enable}' == 'true'") | ||
//public class SwaggerConfig { | ||
// | ||
// | ||
// @Bean | ||
// public Docket createRestApi() { | ||
// return new Docket(DocumentationType.SWAGGER_2) | ||
// .apiInfo(apiInfo()) | ||
// .select() | ||
// .apis(RequestHandlerSelectors.basePackage("com.crossoverjie.cim.route.controller")) | ||
// .paths(PathSelectors.any()) | ||
// .build(); | ||
// } | ||
// | ||
// private ApiInfo apiInfo() { | ||
// return new ApiInfoBuilder() | ||
// .title("cim-forward-route") | ||
// .description("cim-forward-route api") | ||
// .termsOfServiceUrl("http://crossoverJie.top") | ||
// .contact("crossoverJie") | ||
// .version("1.0.0") | ||
// .build(); | ||
// } | ||
// | ||
//} | ||
package com.crossoverjie.cim.route.config; | ||
|
||
import io.swagger.v3.oas.models.OpenAPI; | ||
import io.swagger.v3.oas.models.info.Contact; | ||
import io.swagger.v3.oas.models.info.Info; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class SwaggerConfig { | ||
@Bean | ||
public OpenAPI createRestApi() { | ||
return new OpenAPI() | ||
.info(apiInfo()); | ||
} | ||
|
||
private Info apiInfo() { | ||
return new Info() | ||
.title("cim-forward-route") | ||
.description("cim-forward-route api") | ||
.termsOfService("http://crossoverJie.top") | ||
.contact(contact()) | ||
.version("1.0.0"); | ||
} | ||
|
||
private Contact contact () { | ||
Contact contact = new Contact(); | ||
contact.setName("crossoverJie"); | ||
return contact; | ||
} | ||
} |
Oops, something went wrong.