Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
shop
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
曲欣亮
shop
Commits
dbe0a0f8
Commit
dbe0a0f8
authored
Feb 14, 2023
by
张永
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
0dd703fe
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
28 deletions
+18
-28
pom.xml
pom.xml
+1
-3
SwaggerConfig.java
...main/java/com/egolm/shop/common/config/SwaggerConfig.java
+10
-23
application.properties
src/main/resources/application.properties
+7
-2
No files found.
pom.xml
View file @
dbe0a0f8
...
@@ -10,9 +10,7 @@
...
@@ -10,9 +10,7 @@
<properties>
<properties>
<start-class>
com.egolm.shop.ShopApplication
</start-class>
<start-class>
com.egolm.shop.ShopApplication
</start-class>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<project.reporting.outputEncoding>
UTF-8
</project.reporting.outputEncoding>
<project.reporting.outputEncoding>
UTF-8
</project.reporting.outputEncoding>
<maven.build.timestamp>
${maven.build.timestamp}
</maven.build.timestamp>
<maven.build.timestamp.format>
yyyy-MM-dd HH:mm:ss
</maven.build.timestamp.format>
</properties>
</properties>
<parent>
<parent>
...
...
src/main/java/com/egolm/shop/common/config/SwaggerConfig.java
View file @
dbe0a0f8
...
@@ -7,7 +7,10 @@ import org.springframework.web.context.request.async.DeferredResult;
...
@@ -7,7 +7,10 @@ import org.springframework.web.context.request.async.DeferredResult;
import
com.egolm.common.DateUtil
;
import
com.egolm.common.DateUtil
;
import
io.swagger.annotations.ApiOperation
;
import
springfox.documentation.builders.ApiInfoBuilder
;
import
springfox.documentation.builders.ApiInfoBuilder
;
import
springfox.documentation.builders.PathSelectors
;
import
springfox.documentation.builders.RequestHandlerSelectors
;
import
springfox.documentation.service.ApiInfo
;
import
springfox.documentation.service.ApiInfo
;
import
springfox.documentation.spi.DocumentationType
;
import
springfox.documentation.spi.DocumentationType
;
import
springfox.documentation.spring.web.plugins.Docket
;
import
springfox.documentation.spring.web.plugins.Docket
;
...
@@ -17,33 +20,17 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
...
@@ -17,33 +20,17 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableSwagger2
@EnableSwagger2
public
class
SwaggerConfig
{
public
class
SwaggerConfig
{
@Value
(
"${server.servlet.context-path}"
)
private
String
contextPath
;
@Value
(
"${maven.build.timestamp}"
)
private
String
mavenBuildTime
;
@Bean
@Bean
public
Docket
ProductApi
()
{
public
Docket
createRestApi
()
{
return
new
Docket
(
DocumentationType
.
SWAGGER_2
)
return
new
Docket
(
DocumentationType
.
SWAGGER_2
).
apiInfo
(
apiInfo
()).
select
()
.
genericModelSubstitutes
(
DeferredResult
.
class
)
.
apis
(
RequestHandlerSelectors
.
withMethodAnnotation
(
ApiOperation
.
class
)).
paths
(
PathSelectors
.
any
())
.
useDefaultResponseMessages
(
false
)
.
build
();
.
forCodeGeneration
(
false
)
.
pathMapping
(
"/"
)
.
select
()
.
build
()
.
apiInfo
(
productApiInfo
());
}
}
private
ApiInfo
productApiInfo
()
{
private
ApiInfo
apiInfo
()
{
String
releaseTime
=
DateUtil
.
formatTimeEight
(
mavenBuildTime
.
replace
(
"T"
,
" "
).
replace
(
"Z"
,
""
));
return
new
ApiInfoBuilder
().
title
(
"B2B商品在线接口服务在线文档"
).
version
(
"1.0"
).
description
(
"领锋智能(嘉兴)科技有限公司,会员管理系统API"
).
build
();
return
new
ApiInfoBuilder
()
.
title
(
"B2B商品在线接口服务-------"
+
contextPath
+
"---发布时间:-"
+
releaseTime
)
.
termsOfServiceUrl
(
"NO terms of service"
)
.
version
(
"1.0"
)
.
build
();
}
}
...
...
src/main/resources/application.properties
View file @
dbe0a0f8
...
@@ -14,9 +14,14 @@ spring.http.encoding.charset=utf-8
...
@@ -14,9 +14,14 @@ spring.http.encoding.charset=utf-8
spring.aop.proxy-target-class
=
true
spring.aop.proxy-target-class
=
true
spring.profiles.active
=
dev
spring.profiles.active
=
dev
spring.messages.basename
=
messages
spring.messages.basename
=
messages
###版本号
maven.build.timestamp
=
@maven.build.timestamp@
#thymeleaf
# 前缀
spring.thymeleaf.prefix
=
classpath:/templates/
# 后缀
spring.thymeleaf.suffix
=
.html
spring.datasource.username
=
ERP
spring.datasource.username
=
ERP
spring.datasource.password
=
qiyang@2013
spring.datasource.password
=
qiyang@2013
spring.datasource.url
=
jdbc:sqlserver://10.10.0.22:1433;instanceName=SQLSERVER;DatabaseName=B2BDB;allowMultiQueries=true
spring.datasource.url
=
jdbc:sqlserver://10.10.0.22:1433;instanceName=SQLSERVER;DatabaseName=B2BDB;allowMultiQueries=true
...
...
Write
Preview
Markdown
is supported
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