培训课件

This commit is contained in:
zhujunjieit 2018-12-20 21:21:12 +08:00
parent c887bc5e9c
commit 5b220e323e
4 changed files with 21 additions and 20 deletions

View File

@ -49,7 +49,7 @@
<module>ruoyi-exam</module>
<module>ruoyi-vip</module>
<module>ruoyi-train</module>
<module>tuoyi-test</module>
<!--<module>tuoyi-test</module>-->
</modules>
<packaging>pom</packaging>

View File

@ -58,17 +58,17 @@
<version>${ruoyi.version}</version>
</dependency>
<!-- 培训系统-->
<!--<dependency>-->
<!--<groupId>com.ruoyi</groupId>-->
<!--<artifactId>ruoyi-train</artifactId>-->
<!--<version>${ruoyi.version}</version>-->
<!--</dependency>-->
<!-- 测试生成的代码-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>tuoyi-test</artifactId>
<artifactId>ruoyi-train</artifactId>
<version>${ruoyi.version}</version>
</dependency>
<!-- 测试生成的代码-->
<!--<dependency>-->
<!--<groupId>com.ruoyi</groupId>-->
<!--<artifactId>tuoyi-test</artifactId>-->
<!--<version>${ruoyi.version}</version>-->
<!--</dependency>-->
<!-- 定时任务
<dependency>
<groupId>com.ruoyi</groupId>

View File

@ -1,7 +1,7 @@
package com.ruoyi.web.controller.tool;
import cn.hutool.json.JSONObject;
import com.ruoyi.framework.web.service.AliyunOSSClient;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
@ -12,11 +12,12 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping("aliyun/oss")
public class AliyunOSSRest {
@Autowired
private AliyunOSSClient aliyunOSSClient ;
// @Autowired
// private AliyunOSSClient aliyunOSSClient ;
@GetMapping("policy.json")
public JSONObject getPolicy() {
String dir = String.valueOf(System.currentTimeMillis());
return aliyunOSSClient .getPostObjectPolicy(dir);
// return aliyunOSSClient .getPostObjectPolicy(dir);
return null;
}
}

View File

@ -1,10 +1,10 @@
package com.ruoyi.framework.web.service;
import cn.hutool.json.JSONObject;
import com.aliyun.oss.OSSClient;
import com.aliyun.oss.common.utils.BinaryUtil;
import com.aliyun.oss.model.MatchMode;
import com.aliyun.oss.model.PolicyConditions;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@ -26,17 +26,17 @@ public class AliyunOSSClient {
private ConfigService configService;
public AliyunOSSClient() {
this.endpoint = configService.getKey("ali.oss.endpoint");
this.accessKeyId = configService.getKey("ali.oss.accessKeyId");
this.accessKeySecret = configService.getKey("ali.oss.accessKeySecret");
this.bucket = configService.getKey("ali.oss.bucket");
// this.endpoint = configService.getKey("ali.oss.endpoint");
// this.accessKeyId = configService.getKey("ali.oss.accessKeyId");
// this.accessKeySecret = configService.getKey("ali.oss.accessKeySecret");
// this.bucket = configService.getKey("ali.oss.bucket");
}
@PostConstruct
void init() {
if (this.ossClient == null) {
this.ossClient = new OSSClient(this.endpoint, this.accessKeyId, this.accessKeySecret);
}
// if (this.ossClient == null) {
// this.ossClient = new OSSClient(this.endpoint, this.accessKeyId, this.accessKeySecret);
// }
}
/**