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
Jeepay
Commits
7fc1b2a5
Commit
7fc1b2a5
authored
Jun 20, 2023
by
terrfly
Browse files
解决payment启动提示错误的问题;
parent
61d475ee
Changes
3
Hide whitespace changes
Inline
Side-by-side
jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/bootstrap/JeepayMgrApplication.java
View file @
7fc1b2a5
...
...
@@ -97,8 +97,8 @@ public class JeepayMgrApplication {
* @Author: terrfly
* @Date: 2023/6/13 15:04
*/
@Bean
(
value
=
"
d
ockerBean"
)
public
Docket
d
ockerBean
()
{
@Bean
(
value
=
"
knife4jD
ockerBean"
)
public
Docket
knife4jD
ockerBean
()
{
return
new
Docket
(
DocumentationType
.
SWAGGER_2
)
//指定使用Swagger2规范
.
apiInfo
(
new
ApiInfoBuilder
().
version
(
"1.0"
).
build
())
//描述字段支持Markdown语法
.
groupName
(
"运营平台"
)
//分组名称
...
...
jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/bootstrap/JeepayMchApplication.java
View file @
7fc1b2a5
...
...
@@ -96,8 +96,8 @@ public class JeepayMchApplication {
* @Author: terrfly
* @Date: 2023/6/13 15:04
*/
@Bean
(
value
=
"
d
ockerBean"
)
public
Docket
d
ockerBean
()
{
@Bean
(
value
=
"
knife4jD
ockerBean"
)
public
Docket
knife4jD
ockerBean
()
{
return
new
Docket
(
DocumentationType
.
SWAGGER_2
)
//指定使用Swagger2规范
.
apiInfo
(
new
ApiInfoBuilder
().
version
(
"1.0"
).
build
())
//描述字段支持Markdown语法
.
groupName
(
"商户平台"
)
//分组名称
...
...
jeepay-payment/src/main/java/com/jeequan/jeepay/pay/config/SwaggerConfiguration.java
View file @
7fc1b2a5
...
...
@@ -11,6 +11,8 @@ import springfox.documentation.spi.DocumentationType;
import
springfox.documentation.spring.web.plugins.Docket
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc
;
import
java.util.ArrayList
;
/**
* knife4j 自定义文档配置
* API访问地址: http://localhost:9216/doc.html
...
...
@@ -20,23 +22,25 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
@EnableSwagger2WebMvc
public
class
SwaggerConfiguration
{
private
final
OpenApiExtensionResolver
openApiExtensionResolver
;
@Autowired
public
SwaggerConfiguration
(
OpenApiExtensionResolver
openApiExtensionResolver
)
{
this
.
openApiExtensionResolver
=
openApiExtensionResolver
;
}
@Autowired
(
required
=
false
)
private
OpenApiExtensionResolver
openApiExtensionResolver
;
@Bean
(
value
=
"defaultApi"
)
public
Docket
defaultApi
()
{
String
groupName
=
"支付网关"
;
Docket
docket
=
new
Docket
(
DocumentationType
.
SWAGGER_2
)
/**
* 功能描述: API访问地址: http://localhost:9216/doc.html
*
* @Return: springfox.documentation.spring.web.plugins.Docket
* @Author: terrfly
* @Date: 2023/6/20 15:04
*/
@Bean
(
value
=
"knife4jDockerBean"
)
public
Docket
knife4jDockerBean
()
{
return
new
Docket
(
DocumentationType
.
SWAGGER_2
)
//指定使用Swagger2规范
.
apiInfo
(
new
ApiInfoBuilder
().
version
(
"1.0"
).
build
())
//描述字段支持Markdown语法
.
groupName
(
groupName
)
.
select
()
.
apis
(
RequestHandlerSelectors
.
withMethodAnnotation
(
ApiOperation
.
class
))
.
build
()
.
extensions
(
openApiExtensionResolver
.
buildExtensions
(
groupName
));
return
docket
;
.
groupName
(
"支付网关"
)
//分组名称
.
select
()
// 配置: 如何扫描
.
apis
(
RequestHandlerSelectors
.
withMethodAnnotation
(
ApiOperation
.
class
))
// 只扫描: ApiOperation 注解文档。 也支持配置包名、 路径等扫描模式。
.
build
().
extensions
(
openApiExtensionResolver
==
null
?
new
ArrayList
<>()
:
openApiExtensionResolver
.
buildExtensions
(
"支付网关"
));
}
}
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