- 增加:qiniu 文件服务
This commit is contained in:
parent
157b166435
commit
83d9afd3d0
@ -5,3 +5,9 @@ spring:
|
|||||||
# Profile 的配置项
|
# Profile 的配置项
|
||||||
profiles:
|
profiles:
|
||||||
active: local
|
active: local
|
||||||
|
|
||||||
|
# TODO 小范 TO 芋艿,这个临时加了个
|
||||||
|
qiniu:
|
||||||
|
bucket: xx
|
||||||
|
access-key: xx
|
||||||
|
secret-key: xx
|
||||||
|
@ -60,6 +60,12 @@
|
|||||||
<artifactId>aliyun-java-sdk-core</artifactId>
|
<artifactId>aliyun-java-sdk-core</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 文件服务商 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.qiniu</groupId>
|
||||||
|
<artifactId>qiniu-java-sdk</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- 工具类相关 -->
|
<!-- 工具类相关 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mapstruct</groupId>
|
<groupId>org.mapstruct</groupId>
|
||||||
@ -78,6 +84,7 @@
|
|||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
<artifactId>fastjson</artifactId>
|
<artifactId>fastjson</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</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>
|
<artifactId>mall-spring-boot-starter-swagger</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 文件服务商 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.qiniu</groupId>
|
|
||||||
<artifactId>qiniu-java-sdk</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
Loading…
Reference in New Issue
Block a user