Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yudao-cloud
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
hblj
yudao-cloud
Commits
0c987989
提交
0c987989
authored
4月 20, 2020
作者:
cherishsince
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
- 修改结构:OSS 七牛
上级
e431f169
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
45 行增加
和
3 行删除
+45
-3
admin.js
admin-web/src/services/admin.js
+1
-1
pom.xml
system/system-rest/pom.xml
+4
-0
AdminsFileController.java
...ll/system/rest/controller/admin/AdminsFileController.java
+38
-0
FileController.java
.../system/application/controller/admins/FileController.java
+1
-1
application.yaml
system/system-start/src/main/resources/application.yaml
+1
-1
没有找到文件。
admin-web/src/services/admin.js
浏览文件 @
0c987989
...
...
@@ -197,7 +197,7 @@ export async function dictionaryDelete(params) {
// file
export
async
function
fileGetQiniuToken
()
{
return
request
(
`/admin-api/admins/file/get
_qiniu_
token`
,
{
return
request
(
`/admin-api/admins/file/get
-qiniu-
token`
,
{
method
:
'GET'
,
});
}
...
...
system/system-rest/pom.xml
浏览文件 @
0c987989
...
...
@@ -30,6 +30,10 @@
<artifactId>
mall-spring-boot-starter-swagger
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
com.qiniu
</groupId>
<artifactId>
qiniu-java-sdk
</artifactId>
</dependency>
</dependencies>
...
...
system/system-rest/src/main/java/cn/iocoder/mall/system/rest/controller/admin/AdminsFileController.java
0 → 100644
浏览文件 @
0c987989
package
cn
.
iocoder
.
mall
.
system
.
rest
.
controller
.
admin
;
import
cn.iocoder.common.framework.vo.CommonResult
;
import
com.qiniu.util.Auth
;
import
io.swagger.annotations.Api
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* 文件模块(Admins API)
*
* author: sin
* time: 2020/4/20 9:41 上午
*/
@RestController
@RequestMapping
(
"admins/file"
)
@Api
(
tags
=
"文件模块"
)
public
class
AdminsFileController
{
private
Logger
logger
=
LoggerFactory
.
getLogger
(
getClass
());
@Autowired
private
Auth
auth
;
@Value
(
"${qiniu.bucket}"
)
private
String
bucket
;
@GetMapping
(
"/get-qiniu-token"
)
public
CommonResult
<
String
>
getQiniuToken
()
{
String
token
=
auth
.
uploadToken
(
bucket
);
logger
.
info
(
"[qiniu_token][token({}) get]"
,
token
);
return
CommonResult
.
success
(
token
);
}
}
system/system-start/src/main/java/cn/iocoder/mall/system/application/controller/admins/FileController.java
浏览文件 @
0c987989
...
...
@@ -23,7 +23,7 @@ public class FileController {
@Value
(
"${qiniu.bucket}"
)
private
String
bucket
;
@GetMapping
(
"/get
_qiniu_
token"
)
@GetMapping
(
"/get
-qiniu-
token"
)
public
CommonResult
<
String
>
getQiniuToken
()
{
String
token
=
auth
.
uploadToken
(
bucket
);
logger
.
info
(
"[qiniu_token][token({}) get]"
,
token
);
...
...
system/system-start/src/main/resources/application.yaml
浏览文件 @
0c987989
...
...
@@ -18,7 +18,7 @@ server:
admins
:
security
:
ignore_urls
:
/admin-api/admins/passport/login, /admin-api/admins/file/get
_qiniu_
token
ignore_urls
:
/admin-api/admins/passport/login, /admin-api/admins/file/get
-qiniu-
token
# qiniu
qiniu
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论