-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 #133 from crossoverJie/jdk17
- Loading branch information
Showing
48 changed files
with
365 additions
and
523 deletions.
There are no files selected for viewing
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
84 changes: 42 additions & 42 deletions
84
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,42 @@ | ||
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 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(); | ||
// } | ||
// | ||
//} |
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
Oops, something went wrong.