- 增加:qiniu 文件服务
This commit is contained in:
parent
157b166435
commit
83d9afd3d0
@ -5,3 +5,9 @@ spring:
|
||||
# Profile 的配置项
|
||||
profiles:
|
||||
active: local
|
||||
|
||||
# TODO 小范 TO 芋艿,这个临时加了个
|
||||
qiniu:
|
||||
bucket: xx
|
||||
access-key: xx
|
||||
secret-key: xx
|
||||
|
@ -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>
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user