yshop1.7.2发布:新增小程序支付与登录,后台新增小程序跳转页面,升级swagger-bootstrap,swaager统一配置迁移到common(防止注解冲突)
This commit is contained in:
@ -1,45 +0,0 @@
|
||||
package co.yixiang.modules.security.config;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @ClassName SwaggerConfiguration
|
||||
* @Author hupeng <610796224@qq.com>
|
||||
* @Date 2019/6/28
|
||||
**/
|
||||
|
||||
@Configuration
|
||||
@EnableSwagger2
|
||||
public class SwaggerConfiguration {
|
||||
@Value("${swagger.enabled}")
|
||||
private Boolean enabled;
|
||||
|
||||
@Bean
|
||||
public Docket createRestApi() {
|
||||
return new Docket(DocumentationType.SWAGGER_2)
|
||||
.apiInfo(apiInfo())
|
||||
.select()
|
||||
.apis(RequestHandlerSelectors.basePackage("co.yixiang.modules"))
|
||||
.paths(PathSelectors.any())
|
||||
.build();
|
||||
}
|
||||
|
||||
private ApiInfo apiInfo() {
|
||||
return new ApiInfoBuilder()
|
||||
.title("yshop商城管理后台API")
|
||||
.description("yshop商城管理后台API")
|
||||
.termsOfServiceUrl("http://localhost:8000")
|
||||
.contact("610796224@qq.com")
|
||||
.version("1.6")
|
||||
.build();
|
||||
}
|
||||
}
|
@ -74,6 +74,9 @@ generator:
|
||||
#是否开启 swagger-ui
|
||||
swagger:
|
||||
enabled: true
|
||||
title: yshop商城管理后台API
|
||||
serverUrl: http://localhost:8000
|
||||
version: 1.7
|
||||
|
||||
# 文件存储路径
|
||||
file:
|
||||
|
@ -78,7 +78,10 @@ generator:
|
||||
|
||||
#是否开启 swagger-ui
|
||||
swagger:
|
||||
enabled: false
|
||||
enabled: true
|
||||
title: yshop商城管理后台API
|
||||
serverUrl: http://localhost:8000
|
||||
version: 1.7
|
||||
|
||||
# 文件存储路径
|
||||
file:
|
||||
|
Reference in New Issue
Block a user