Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
70763a2e
Commit
70763a2e
authored
Jul 18, 2018
by
Junling Bu
Browse files
feat[litemall-core]: 取消支持swagger,尽量保持项目的精简。
parent
d265da9f
Changes
3
Hide whitespace changes
Inline
Side-by-side
litemall-core/pom.xml
View file @
70763a2e
...
...
@@ -22,15 +22,6 @@
<artifactId>
jackson-datatype-jsr310
</artifactId>
</dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger2
</artifactId>
</dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger-ui
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-context-support
</artifactId>
...
...
litemall-core/src/main/java/org/linlinjava/litemall/core/config/SwaggerConfig.java
deleted
100644 → 0
View file @
d265da9f
package
org.linlinjava.litemall.core.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.service.Contact
;
import
springfox.documentation.spi.DocumentationType
;
import
springfox.documentation.spring.web.plugins.Docket
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
@Configuration
@EnableSwagger2
public
class
SwaggerConfig
{
@Value
(
"${swagger.enable:true}"
)
private
boolean
enableSwagger
;
@Bean
public
Docket
createRestApi
()
{
return
new
Docket
(
DocumentationType
.
SWAGGER_2
)
.
apiInfo
(
apiInfo
())
.
enable
(
enableSwagger
)
.
select
()
.
apis
(
RequestHandlerSelectors
.
basePackage
(
"org.linlinjava.litemall"
))
.
paths
(
PathSelectors
.
any
())
.
build
();
}
private
ApiInfo
apiInfo
()
{
return
new
ApiInfoBuilder
()
.
title
(
"litemall"
)
.
description
(
"又一个小商城。litemall = Spring Boot后端 + Vue管理员前端 + 微信小程序用户前端"
)
.
termsOfServiceUrl
(
"https://github.com/linlinjava/litemall"
)
.
version
(
"0.1.0"
)
.
license
(
"MIT"
)
.
licenseUrl
(
"https://github.com/linlinjava/litemall/blob/master/LICENSE"
)
.
contact
(
new
Contact
(
"linlinjava"
,
"https://github.com/linlinjava"
,
"linlinjava@163.com"
))
.
build
();
}
}
pom.xml
View file @
70763a2e
...
...
@@ -100,18 +100,6 @@
<artifactId>
weixin-java-miniapp
</artifactId>
<version>
3.0.0
</version>
</dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger2
</artifactId>
<version>
2.8.0
</version>
</dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger-ui
</artifactId>
<version>
2.8.0
</version>
</dependency>
</dependencies>
</dependencyManagement>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment