Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
basic-api-boot
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-api-boot
Commits
b54bb589
提交
b54bb589
authored
4月 13, 2022
作者:
17607474349
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:
1、添加myexcel依赖库 2、实现对职位数据的相关操作
上级
d1d1f07a
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
534 行增加
和
5 行删除
+534
-5
build.gradle
basic-auth/build.gradle
+3
-0
PostRepository.java
...main/java/com/yiring/auth/domain/post/PostRepository.java
+2
-1
PostExcel.java
...h/src/main/java/com/yiring/auth/excel/post/PostExcel.java
+56
-0
FindPostParam.java
...c/main/java/com/yiring/auth/param/post/FindPostParam.java
+37
-0
PostParam.java
...h/src/main/java/com/yiring/auth/param/post/PostParam.java
+39
-0
PostService.java
...c/main/java/com/yiring/auth/service/post/PostService.java
+67
-0
PostServiceImpl.java
...va/com/yiring/auth/service/post/impl/PostServiceImpl.java
+165
-0
PostVo.java
basic-auth/src/main/java/com/yiring/auth/vo/post/PostVo.java
+68
-0
PostController.java
...rc/main/java/com/yiring/auth/web/post/PostController.java
+71
-0
SwaggerConfig.java
...rc/main/java/com/yiring/common/swagger/SwaggerConfig.java
+24
-4
build.gradle
build.gradle
+2
-0
没有找到文件。
basic-auth/build.gradle
浏览文件 @
b54bb589
...
...
@@ -20,4 +20,7 @@ dependencies {
// fastjson
implementation
"com.alibaba:fastjson:${fastJsonVersion}"
// myexcel
implementation
"com.github.liaochong:myexcel:${myexcelVersion}"
}
basic-auth/src/main/java/com/yiring/auth/domain/post/PostRepository.java
浏览文件 @
b54bb589
...
...
@@ -3,6 +3,7 @@ package com.yiring.auth.domain.post;
import
java.io.Serializable
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
import
org.springframework.stereotype.Repository
;
/**
...
...
@@ -12,4 +13,4 @@ import org.springframework.stereotype.Repository;
*/
@Repository
public
interface
PostRepository
extends
JpaRepository
<
Post
,
Serializable
>
{}
public
interface
PostRepository
extends
JpaRepository
<
Post
,
Serializable
>
,
JpaSpecificationExecutor
<
Post
>
{}
basic-auth/src/main/java/com/yiring/auth/excel/post/PostExcel.java
0 → 100644
浏览文件 @
b54bb589
/* (C) 2022 YiRing, Inc. */
package
com
.
yiring
.
auth
.
excel
.
post
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.fasterxml.jackson.databind.ser.std.ToStringSerializer
;
import
com.github.liaochong.myexcel.core.annotation.ExcelColumn
;
import
com.github.liaochong.myexcel.core.annotation.ExcelModel
;
import
com.yiring.auth.domain.post.Post
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
lombok.AccessLevel
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.experimental.FieldDefaults
;
/**
* 职位信息导出模型
* @author LJ-2204
* @date 2022/4/13
*/
@ExcelModel
@Data
@Builder
@FieldDefaults
(
level
=
AccessLevel
.
PRIVATE
)
public
class
PostExcel
{
@ExcelColumn
(
title
=
"编号"
)
@JsonSerialize
(
using
=
ToStringSerializer
.
class
)
Long
id
;
@ExcelColumn
(
title
=
"职位名称"
)
String
name
;
@ExcelColumn
(
title
=
"职位描述"
)
String
describe
;
@ExcelColumn
(
title
=
"是否启用"
)
@JsonSerialize
(
using
=
ToStringSerializer
.
class
)
Boolean
enable
;
public
static
List
<
PostExcel
>
transforms
(
List
<
Post
>
posts
)
{
return
posts
.
stream
()
.
map
(
post
->
PostExcel
.
builder
()
.
id
(
post
.
getId
())
.
name
(
post
.
getName
())
.
describe
(
post
.
getDescribe
())
.
enable
(
post
.
getEnable
())
.
build
()
)
.
collect
(
Collectors
.
toList
());
}
}
basic-auth/src/main/java/com/yiring/auth/param/post/FindPostParam.java
0 → 100644
浏览文件 @
b54bb589
/* (C) 2022 YiRing, Inc. */
package
com
.
yiring
.
auth
.
param
.
post
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
import
lombok.*
;
import
lombok.experimental.FieldDefaults
;
/**
* 职位分页入参
* @author LJ-2204
* @date 2022/4/13
*/
@ApiModel
(
"FindPostParam"
)
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@FieldDefaults
(
level
=
AccessLevel
.
PRIVATE
)
public
class
FindPostParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1926710333813935577L
;
@ApiModelProperty
(
value
=
"名称"
,
example
=
"Java"
)
String
name
;
@ApiModelProperty
(
value
=
"是否启用"
,
example
=
"true"
)
Boolean
enable
;
@ApiModelProperty
(
value
=
"每页记录数"
,
example
=
"10"
)
Integer
pageSize
;
@ApiModelProperty
(
value
=
"页码"
,
example
=
"1"
)
Integer
pageNo
;
}
basic-auth/src/main/java/com/yiring/auth/param/post/PostParam.java
0 → 100644
浏览文件 @
b54bb589
/* (C) 2022 YiRing, Inc. */
package
com
.
yiring
.
auth
.
param
.
post
;
import
com.yiring.auth.domain.post.Post
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
import
lombok.*
;
import
lombok.experimental.FieldDefaults
;
/**
* 职位信息入参类
* @author LJ-2204
* @date 2022/4/12
*/
@ApiModel
(
"PostParam"
)
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@FieldDefaults
(
level
=
AccessLevel
.
PRIVATE
)
public
class
PostParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
5247408856592333466L
;
@ApiModelProperty
(
value
=
"名称"
,
example
=
"Java"
,
required
=
true
)
String
name
;
@ApiModelProperty
(
value
=
"描述"
,
example
=
"描述"
,
required
=
true
)
String
describe
;
@ApiModelProperty
(
value
=
"是否启用"
,
example
=
"true"
,
required
=
true
)
Boolean
enable
;
public
Post
transform
()
{
return
Post
.
builder
().
name
(
this
.
name
).
describe
(
this
.
describe
).
enable
(
this
.
enable
).
build
();
}
}
basic-auth/src/main/java/com/yiring/auth/service/post/PostService.java
0 → 100644
浏览文件 @
b54bb589
/* (C) 2022 YiRing, Inc. */
package
com
.
yiring
.
auth
.
service
.
post
;
import
com.yiring.auth.param.post.FindPostParam
;
import
com.yiring.auth.param.post.PostParam
;
import
com.yiring.auth.vo.post.PostVo
;
import
com.yiring.common.core.Result
;
import
com.yiring.common.param.IdParam
;
import
com.yiring.common.vo.PageVo
;
import
javax.servlet.http.HttpServletResponse
;
/**
* 职位信息
* @author LJ-2204
* @date 2022/4/13
*/
public
interface
PostService
{
/**
* 新增职位信息
* @param postParam
* @return Result<String>
*/
Result
<
String
>
addPost
(
PostParam
postParam
);
/**
* 修改职位信息
* @param postParam
* @param idParam
* @return Result<String>
*/
Result
<
String
>
modifyPost
(
PostParam
postParam
,
IdParam
idParam
);
/**
* 销毁职位信息
* @param idParam
* @return
*/
Result
<
String
>
deletePost
(
IdParam
idParam
);
/**
* 职位信息分页
* @param param
* @return
*/
Result
<
PageVo
<
PostVo
>>
findPostPage
(
FindPostParam
param
);
/**
* 详细信息查询
* @param idParam
* @return
*/
Result
<
PostVo
>
findPostById
(
IdParam
idParam
);
/**
* 根据名称判断是否存在职业信息
* @param name
* @return
*/
boolean
hasPostInfo
(
String
name
);
/**
* 导出职位信息
* @param param
* @param response
*/
void
exportPostInfo
(
FindPostParam
param
,
HttpServletResponse
response
);
}
basic-auth/src/main/java/com/yiring/auth/service/post/impl/PostServiceImpl.java
0 → 100644
浏览文件 @
b54bb589
/* (C) 2022 YiRing, Inc. */
package
com
.
yiring
.
auth
.
service
.
post
.
impl
;
import
cn.hutool.core.collection.ListUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.github.liaochong.myexcel.core.DefaultStreamExcelBuilder
;
import
com.yiring.auth.domain.post.Post
;
import
com.yiring.auth.domain.post.PostRepository
;
import
com.yiring.auth.excel.post.PostExcel
;
import
com.yiring.auth.param.post.FindPostParam
;
import
com.yiring.auth.param.post.PostParam
;
import
com.yiring.auth.service.post.PostService
;
import
com.yiring.auth.vo.post.PostVo
;
import
com.yiring.common.core.Result
;
import
com.yiring.common.core.Status
;
import
com.yiring.common.param.IdParam
;
import
com.yiring.common.vo.PageVo
;
import
java.io.OutputStream
;
import
java.net.URLEncoder
;
import
java.nio.charset.StandardCharsets
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.concurrent.Executors
;
import
javax.annotation.Resource
;
import
javax.persistence.criteria.Predicate
;
import
javax.servlet.http.HttpServletResponse
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.poi.ss.usermodel.Workbook
;
import
org.springframework.data.domain.Example
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
/**
* 职位信息
* @author LJ-2204
* @date 2022/4/13
*/
@Transactional
(
rollbackFor
=
RuntimeException
.
class
)
@Service
@Slf4j
public
class
PostServiceImpl
implements
PostService
{
@Resource
PostRepository
postRepository
;
@Override
public
Result
<
String
>
addPost
(
PostParam
postParam
)
{
if
(
hasPostInfo
(
postParam
.
getName
()))
return
Result
.
no
(
Status
.
INTERNAL_SERVER_ERROR
,
"职位已存在"
);
Post
post
=
postParam
.
transform
();
postRepository
.
save
(
post
);
return
Result
.
ok
();
}
@Override
public
Result
<
String
>
modifyPost
(
PostParam
postParam
,
IdParam
idParam
)
{
Optional
<
Post
>
postOptional
=
postRepository
.
findById
(
idParam
.
getId
());
if
(
postOptional
.
isEmpty
())
return
Result
.
no
(
Status
.
INTERNAL_SERVER_ERROR
,
"被修改的数据不存在"
);
Post
post
=
postOptional
.
get
();
if
(!
StrUtil
.
equals
(
post
.
getName
(),
postParam
.
getName
()))
{
if
(
hasPostInfo
(
postParam
.
getName
()))
return
Result
.
no
(
Status
.
INTERNAL_SERVER_ERROR
,
"职位已存在"
);
}
post
=
postParam
.
transform
();
post
.
setId
(
idParam
.
getId
());
postRepository
.
save
(
post
);
return
Result
.
ok
();
}
@Override
public
Result
<
String
>
deletePost
(
IdParam
idParam
)
{
Post
post
=
Post
.
builder
().
id
(
idParam
.
getId
()).
build
();
postRepository
.
delete
(
post
);
return
Result
.
ok
();
}
@Override
public
Result
<
PageVo
<
PostVo
>>
findPostPage
(
FindPostParam
param
)
{
Specification
<
Post
>
specification
=
getPostPageSpecification
(
param
);
if
(
ObjectUtil
.
isEmpty
(
param
.
getPageSize
())
&&
ObjectUtil
.
isEmpty
(
param
.
getPageNo
()))
{
//分页
Pageable
pageable
=
PageRequest
.
of
(
param
.
getPageNo
()
-
1
,
param
.
getPageSize
());
Page
<
Post
>
page
=
postRepository
.
findAll
(
specification
,
pageable
);
List
<
PostVo
>
postVos
=
PostVo
.
transforms
(
page
.
getContent
());
PageVo
<
PostVo
>
pageVo
=
PageVo
.
build
(
postVos
,
postVos
.
size
());
return
Result
.
ok
(
pageVo
);
}
else
{
List
<
Post
>
posts
=
postRepository
.
findAll
(
specification
);
List
<
PostVo
>
postVos
=
PostVo
.
transforms
(
posts
);
PageVo
<
PostVo
>
pageVo
=
PageVo
.
build
(
postVos
,
postVos
.
size
());
return
Result
.
ok
(
pageVo
);
}
}
@Override
public
Result
<
PostVo
>
findPostById
(
IdParam
idParam
)
{
Post
post
=
postRepository
.
getById
(
idParam
.
getId
());
PostVo
postVo
=
PostVo
.
transform
(
post
);
return
Result
.
ok
(
postVo
);
}
@Override
public
boolean
hasPostInfo
(
String
name
)
{
Post
post
=
Post
.
builder
().
name
(
name
).
build
();
return
postRepository
.
count
(
Example
.
of
(
post
))
>
0
;
}
@Override
public
void
exportPostInfo
(
FindPostParam
param
,
HttpServletResponse
response
)
{
Specification
<
Post
>
specification
=
getPostPageSpecification
(
param
);
List
<
Post
>
postList
=
postRepository
.
findAll
(
specification
);
List
<
PostExcel
>
postExcels
=
PostExcel
.
transforms
(
postList
);
try
(
DefaultStreamExcelBuilder
<
PostExcel
>
streamExcelBuilder
=
DefaultStreamExcelBuilder
.
of
(
PostExcel
.
class
)
.
threadPool
(
Executors
.
newFixedThreadPool
(
2
))
.
rowHeight
(
14
)
.
titleRowHeight
(
14
)
.
style
(
"cell->vertical-align:center;text-align:center"
,
"title->vertical-align:center;text-align:center;font-weight:bold;font-family:等线"
)
.
start
()
)
{
streamExcelBuilder
.
append
(
postExcels
);
String
fileName
=
URLEncoder
.
encode
(
"职位信息.xlsx"
,
StandardCharsets
.
UTF_8
);
response
.
setContentType
(
"application/octet-stream"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
fileName
);
OutputStream
out
=
response
.
getOutputStream
();
Workbook
workbook
=
streamExcelBuilder
.
fixedTitles
().
build
();
workbook
.
write
(
out
);
workbook
.
close
();
out
.
flush
();
out
.
close
();
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
RuntimeException
(
"导出岗位信息失败: "
+
e
.
getMessage
());
}
}
private
Specification
<
Post
>
getPostPageSpecification
(
FindPostParam
param
)
{
return
(
root
,
cq
,
cb
)
->
{
List
<
Predicate
>
predicates
=
ListUtil
.
toList
();
if
(
StrUtil
.
isNotEmpty
(
param
.
getName
()))
{
predicates
.
add
(
cb
.
equal
(
root
.
get
(
Post
.
Fields
.
name
),
param
.
getName
()));
}
if
(
ObjectUtil
.
isNotEmpty
(
param
.
getEnable
()))
{
predicates
.
add
(
cb
.
equal
(
root
.
get
(
Post
.
Fields
.
enable
),
param
.
getEnable
()));
}
return
cq
.
where
(
predicates
.
toArray
(
new
Predicate
[
0
])).
getRestriction
();
};
}
}
basic-auth/src/main/java/com/yiring/auth/vo/post/PostVo.java
0 → 100644
浏览文件 @
b54bb589
/* (C) 2022 YiRing, Inc. */
package
com
.
yiring
.
auth
.
vo
.
post
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.fasterxml.jackson.databind.ser.std.ToStringSerializer
;
import
com.yiring.auth.domain.post.Post
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.io.Serializable
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
lombok.*
;
import
lombok.experimental.FieldDefaults
;
/**
* 职位信息视图
* @author LJ-2204
* @date 2022/4/13
*/
@ApiModel
(
"PostVo"
)
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@FieldDefaults
(
level
=
AccessLevel
.
PRIVATE
)
public
class
PostVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1011259844584399825L
;
@JsonSerialize
(
using
=
ToStringSerializer
.
class
)
@ApiModelProperty
(
value
=
"主键"
,
example
=
"1"
)
Long
id
;
@ApiModelProperty
(
value
=
"名称"
,
example
=
"Java"
)
String
name
;
@ApiModelProperty
(
value
=
"描述"
,
example
=
"描述"
)
String
describe
;
@ApiModelProperty
(
value
=
"是否启用"
,
example
=
"true"
)
Boolean
enable
;
public
static
PostVo
transform
(
Post
post
)
{
return
PostVo
.
builder
()
.
id
(
post
.
getId
())
.
name
(
post
.
getName
())
.
describe
(
post
.
getDescribe
())
.
enable
(
post
.
getEnable
())
.
build
();
}
public
static
List
<
PostVo
>
transforms
(
List
<
Post
>
posts
)
{
return
posts
.
stream
()
.
map
(
post
->
PostVo
.
builder
()
.
id
(
post
.
getId
())
.
name
(
post
.
getName
())
.
describe
(
post
.
getDescribe
())
.
enable
(
post
.
getEnable
())
.
build
()
)
.
collect
(
Collectors
.
toList
());
}
}
basic-auth/src/main/java/com/yiring/auth/web/post/PostController.java
0 → 100644
浏览文件 @
b54bb589
/* (C) 2022 YiRing, Inc. */
package
com
.
yiring
.
auth
.
web
.
post
;
import
com.yiring.auth.param.post.FindPostParam
;
import
com.yiring.auth.param.post.PostParam
;
import
com.yiring.auth.service.post.PostService
;
import
com.yiring.auth.vo.post.PostVo
;
import
com.yiring.common.core.Result
;
import
com.yiring.common.param.IdParam
;
import
com.yiring.common.vo.PageVo
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.Valid
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
/**
* 职位信息控制器
* @author LJ-2204
* @date 2022/4/12
*/
@Slf4j
@Validated
@Api
(
tags
=
"职位信息"
)
@RestController
@RequestMapping
(
"/post/"
)
public
class
PostController
{
@Resource
PostService
postService
;
@ApiOperation
(
value
=
"新增职位"
)
@PostMapping
(
"addPost"
)
public
Result
<
String
>
addPost
(
@Valid
PostParam
postParam
)
{
return
postService
.
addPost
(
postParam
);
}
@ApiOperation
(
value
=
"修改职位"
)
@PutMapping
(
"modifyPost"
)
public
Result
<
String
>
modifyPost
(
@Valid
PostParam
postParam
,
@Valid
IdParam
idParam
)
{
return
postService
.
modifyPost
(
postParam
,
idParam
);
}
@ApiOperation
(
value
=
"销毁职位"
)
@DeleteMapping
(
"deletePost"
)
public
Result
<
String
>
deletePost
(
@Valid
IdParam
idParam
)
{
return
postService
.
deletePost
(
idParam
);
}
@ApiOperation
(
value
=
"分页查询"
)
@GetMapping
(
"findPostPage"
)
public
Result
<
PageVo
<
PostVo
>>
findPostPage
(
@Valid
FindPostParam
param
)
{
return
postService
.
findPostPage
(
param
);
}
@ApiOperation
(
value
=
"详细信息查询"
)
@GetMapping
(
"findPostById"
)
public
Result
<
PostVo
>
findPostById
(
@Valid
IdParam
idParam
)
{
return
postService
.
findPostById
(
idParam
);
}
@ApiOperation
(
value
=
"导出职位信息"
)
@GetMapping
(
"exportPostInfo"
)
public
void
exportPostInfo
(
@Valid
FindPostParam
param
,
HttpServletResponse
response
)
{
postService
.
exportPostInfo
(
param
,
response
);
}
}
basic-common/doc/src/main/java/com/yiring/common/swagger/SwaggerConfig.java
浏览文件 @
b54bb589
...
...
@@ -4,6 +4,7 @@ package com.yiring.common.swagger;
import
com.github.xiaoymin.knife4j.spring.extension.OpenApiExtensionResolver
;
import
com.yiring.common.core.Status
;
import
io.swagger.annotations.Api
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.function.Predicate
;
...
...
@@ -17,12 +18,11 @@ import org.springframework.context.annotation.Import;
import
org.springframework.context.annotation.Profile
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration
;
import
springfox.documentation.builders.ApiInfoBuilder
;
import
springfox.documentation.builders.PathSelectors
;
import
springfox.documentation.builders.RequestHandlerSelectors
;
import
springfox.documentation.builders.ResponseMessageBuilder
;
import
springfox.documentation.builders.*
;
import
springfox.documentation.schema.ModelRef
;
import
springfox.documentation.service.ApiInfo
;
import
springfox.documentation.service.Contact
;
import
springfox.documentation.service.Parameter
;
import
springfox.documentation.service.ResponseMessage
;
import
springfox.documentation.spi.DocumentationType
;
import
springfox.documentation.spring.web.plugins.Docket
;
...
...
@@ -68,6 +68,7 @@ public class SwaggerConfig {
.
groupName
(
group
)
.
apiInfo
(
apiInfo
())
.
useDefaultResponseMessages
(
false
)
.
globalOperationParameters
(
buildGlobalRequestParameters
())
.
globalResponseMessage
(
RequestMethod
.
GET
,
buildGlobalResponseMessage
())
.
globalResponseMessage
(
RequestMethod
.
POST
,
buildGlobalResponseMessage
())
.
globalResponseMessage
(
RequestMethod
.
DELETE
,
buildGlobalResponseMessage
())
...
...
@@ -99,4 +100,23 @@ public class SwaggerConfig {
.
map
(
status
->
new
ResponseMessageBuilder
().
code
(
status
.
value
()).
message
(
status
.
getReasonPhrase
()).
build
())
.
collect
(
Collectors
.
toList
());
}
/**
* 构建全局请求参数
*
* @return Token 等自定义全局参数/Header
*/
private
List
<
Parameter
>
buildGlobalRequestParameters
()
{
List
<
Parameter
>
parameters
=
new
ArrayList
<>();
parameters
.
add
(
new
ParameterBuilder
()
.
name
(
"Authorization"
)
.
description
(
"认证token"
)
.
modelRef
(
new
ModelRef
(
"string"
))
.
parameterType
(
"header"
)
.
required
(
false
)
.
build
()
);
return
parameters
;
}
}
build.gradle
浏览文件 @
b54bb589
...
...
@@ -25,6 +25,8 @@ buildscript {
minioVersion
=
'8.3.7'
// https://mvnrepository.com/artifact/org.locationtech.jts/jts-core
jtsVersion
=
'1.18.2'
// https://mvnrepository.com/artifact/com.github.liaochong/myexcel
myexcelVersion
=
'4.1.0'
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论