-
Notifications
You must be signed in to change notification settings - Fork 53
优化关联应用功能 #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
优化关联应用功能 #61
Changes from 6 commits
be94f81
05f6b80
b586257
a96d55a
81c500b
fce71ef
749375f
e8d5517
bbb5293
6ae5787
135e93a
b9200c8
804ea73
c921a59
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,4 +70,10 @@ public class SofaDashboardConstants { | |
| public static final String ZOOKEEPER_PREFIX = "zookeeper://"; | ||
| public static final String SOFA_PREFIX = "sofa://"; | ||
|
|
||
| // API接口类 | ||
| public static final String API_ARK_TAGS = "Ark相关接口"; | ||
|
||
| public static final String API_APPLICATION_TAGS = "Application相关接口"; | ||
| public static final String API_GOVERNANCE_TAGS = "Governance相关接口"; | ||
| public static final String API_WEB_TAGS = "Web相关接口"; | ||
|
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,25 @@ | |
| </properties> | ||
|
|
||
| <dependencies> | ||
| <!--knife4j--> | ||
| <dependency> | ||
| <groupId>com.github.xiaoymin</groupId> | ||
| <artifactId>knife4j-spring-boot-starter</artifactId> | ||
| <version>2.0.7</version> | ||
|
||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>com.google.guava</groupId> | ||
| <artifactId>guava</artifactId> | ||
| <version>20.0</version> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>org.springframework.plugin</groupId> | ||
| <artifactId>spring-plugin-core</artifactId> | ||
| <version>2.0.0.RELEASE</version> | ||
| </dependency> | ||
|
|
||
| <dependency> | ||
| <groupId>com.alipay.sofa</groupId> | ||
| <artifactId>sofa-dashboard-governance</artifactId> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| package com.alipay.sofa.dashboard.configuration; | ||
|
|
||
| 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.service.Contact; | ||
| import springfox.documentation.spi.DocumentationType; | ||
| import springfox.documentation.spring.web.plugins.Docket; | ||
| import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc; | ||
|
|
||
|
|
||
| @Configuration | ||
| @EnableSwagger2WebMvc | ||
| public class Swagger2Config { | ||
| @Bean | ||
| public Docket createRestApi() { | ||
| return new Docket(DocumentationType.SWAGGER_2) | ||
| .useDefaultResponseMessages(false) | ||
| .apiInfo(apiInfo()) | ||
| .groupName("1.0版本") | ||
|
||
| .select() | ||
| .apis(RequestHandlerSelectors.basePackage("com.alipay.sofa.dashboard.controller")) | ||
| .paths(PathSelectors.any()) | ||
| .build(); | ||
|
|
||
| } | ||
|
|
||
| private ApiInfo apiInfo() { | ||
| return new ApiInfoBuilder() | ||
| .title("SOFADashboard APIs") | ||
| .description("SOFADashboard 接口对接文档") | ||
| .termsOfServiceUrl("http://localhost:8099/") | ||
| .version("1.0") | ||
| .build(); | ||
| } | ||
|
|
||
|
|
||
|
|
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
注意格式化