- 增加:qiniu 文件服务

pull/2/MERGE
cherishsince 2020-05-02 08:38:05 +08:00
parent 157b166435
commit 83d9afd3d0
4 changed files with 34 additions and 6 deletions

View File

@ -5,3 +5,9 @@ spring:
# Profile 的配置项
profiles:
active: local
# TODO 小范 TO 芋艿,这个临时加了个
qiniu:
bucket: xx
access-key: xx
secret-key: xx

View File

@ -60,6 +60,12 @@
<artifactId>aliyun-java-sdk-core</artifactId>
</dependency>
<!-- 文件服务商 -->
<dependency>
<groupId>com.qiniu</groupId>
<artifactId>qiniu-java-sdk</artifactId>
</dependency>
<!-- 工具类相关 -->
<dependency>
<groupId>org.mapstruct</groupId>
@ -78,6 +84,7 @@
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,21 @@
package cn.iocoder.mall.system.biz.config;
import com.qiniu.util.Auth;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class QiniuConfiguration {
@Value("${qiniu.access-key}")
private String accessKey;
@Value("${qiniu.secret-key}")
private String secretKey;
@Bean
public Auth auth() {
return Auth.create(accessKey, secretKey);
}
}

View File

@ -36,12 +36,6 @@
<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>
</project>