Просмотр исходного кода

feat: "添加oss和onlyoffice的逻辑"

Leonezhurui 2 лет назад
Родитель
Сommit
efea66ac40

+ 15 - 0
pom.xml

@@ -147,6 +147,21 @@
             <artifactId>spring-boot-starter-data-mongodb</artifactId>
         </dependency>
 
+        <!-- OSS依赖-->
+        <dependency>
+            <groupId>com.aliyun.oss</groupId>
+            <artifactId>aliyun-sdk-oss</artifactId>
+            <version>3.17.4</version>
+        </dependency>
+
+        <!-- fastjson2依赖 -->
+        <dependency>
+            <groupId>com.alibaba.fastjson2</groupId>
+            <artifactId>fastjson2</artifactId>
+            <version>2.0.47</version>
+        </dependency>
+
+
 
 
 

+ 30 - 0
src/main/java/com/njuzr/eaibackend/config/OssConfig.java

@@ -0,0 +1,30 @@
+package com.njuzr.eaibackend.config;
+
+import com.aliyun.oss.OSS;
+import com.aliyun.oss.OSSClientBuilder;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @author: Leonezhurui
+ * @Date: 2024/3/13 - 09:15
+ * @Package: EAI-Backend
+ */
+
+@Configuration
+public class OssConfig {
+    @Value("${aliyun.oss.endpoint}")
+    private String endpoint;
+
+    @Value("${aliyun.oss.accessKeyId}")
+    private String accessKeyId;
+
+    @Value("${aliyun.oss.accessKeySecret}")
+    private String accessKeySecret;
+
+    @Bean
+    public OSS ossClient() {
+        return new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
+    }
+}

+ 1 - 1
src/main/java/com/njuzr/eaibackend/config/SecurityConfig.java

@@ -50,7 +50,7 @@ public class SecurityConfig {
     public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
         http
                 .authorizeHttpRequests(authorize -> authorize
-                        .requestMatchers("/api/user/login", "/api/user/register", "/api/user/verifyCode").permitAll() // 允许公开访问的路径
+                        .requestMatchers("/api/user/login", "/api/user/register", "/api/user/verifyCode", "/api/onlyoffice/**").permitAll() // 允许公开访问的路径
                         .anyRequest().authenticated() // 其他所有请求需要认证
                 )
                 .exceptionHandling(exception -> exception

+ 19 - 2
src/main/java/com/njuzr/eaibackend/controller/AssignmentController.java

@@ -2,6 +2,13 @@ package com.njuzr.eaibackend.controller;
 
 import com.njuzr.eaibackend.dto.AssignmentDTO;
 import com.njuzr.eaibackend.enums.AssignmentStatus;
+import com.njuzr.eaibackend.po.MyUserDetails;
+import com.njuzr.eaibackend.service.AssignmentService;
+import com.njuzr.eaibackend.vo.AssignmentVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.security.core.annotation.AuthenticationPrincipal;
+import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
 /**
@@ -14,18 +21,28 @@ import org.springframework.web.bind.annotation.*;
 @RequestMapping("/api/assignment")
 public class AssignmentController {
 
+    private final AssignmentService assignmentService;
+
+    @Autowired
+    public AssignmentController(AssignmentService assignmentService) {
+        this.assignmentService = assignmentService;
+    }
+
     /**
      * 创建作业,在某一个课程下创建作业
      * @param courseId
      * @param assignmentDTO
      * @return
      */
+    @PreAuthorize("hasRole('TEACHER') or hasRole('ADMIN')")
     @PostMapping
     public MyResponse createAssignment(
+            @AuthenticationPrincipal MyUserDetails user,
             @RequestParam Long courseId,
-            @RequestBody AssignmentDTO assignmentDTO
+            @Validated @RequestBody AssignmentDTO assignmentDTO
     ) {
-        return MyResponse.success("");
+
+        return MyResponse.success(assignmentService.createAssignment(user, courseId, assignmentDTO));
 
     }
 

+ 47 - 0
src/main/java/com/njuzr/eaibackend/controller/FileController.java

@@ -0,0 +1,47 @@
+package com.njuzr.eaibackend.controller;
+
+import com.njuzr.eaibackend.utils.OssUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+
+/**
+ * @author: Leonezhurui
+ * @Date: 2024/3/13 - 09:27
+ * @Package: EAI-Backend
+ */
+
+@Slf4j
+@RestController
+@RequestMapping("/api/file")
+public class FileController {
+    private final OssUtil ossUtil;
+
+    @Autowired
+    public FileController(OssUtil ossUtil) {
+        this.ossUtil = ossUtil;
+    }
+
+
+    @PostMapping
+    public MyResponse upload(@RequestParam("file") MultipartFile file) throws IOException {
+        String filePath = "uploads/" + file.getOriginalFilename();
+        String url = ossUtil.uploadFile(file.getInputStream(), filePath);
+        return MyResponse.success(url);
+    }
+
+    @GetMapping
+    public MyResponse getFiles() {
+        return MyResponse.success(ossUtil.listFiles());
+    }
+
+    @DeleteMapping
+    public MyResponse delete(@RequestParam String filePath) {
+        ossUtil.deleteFile(filePath);
+        return MyResponse.success("删除成功");
+    }
+
+}

+ 106 - 0
src/main/java/com/njuzr/eaibackend/controller/OnlyOfficeController.java

@@ -0,0 +1,106 @@
+package com.njuzr.eaibackend.controller;
+
+import com.alibaba.fastjson2.JSONObject;
+import com.njuzr.eaibackend.dto.ForceSave;
+import com.njuzr.eaibackend.exception.MyException;
+import com.njuzr.eaibackend.utils.FileUtil;
+import com.njuzr.eaibackend.utils.OssUtil;
+import com.njuzr.eaibackend.utils.WebClientUtil;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.io.Resource;
+import org.springframework.http.HttpStatus;
+import org.springframework.web.bind.annotation.*;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Objects;
+import java.util.Scanner;
+
+/**
+ * @author: Leonezhurui
+ * @Date: 2024/3/13 - 21:22
+ * @Package: EAI-Backend
+ */
+
+@Slf4j
+@RestController
+@RequestMapping("/api/onlyoffice")
+public class OnlyOfficeController {
+    private final WebClientUtil webClientUtil = new WebClientUtil("http://47.111.23.171:8082/coauthoring/CommandService.ashx");
+
+    private final FileUtil fileUtil = new FileUtil();
+
+    private final OssUtil ossUtil;
+
+    @Autowired
+    public OnlyOfficeController(OssUtil ossUtil) {
+        this.ossUtil = ossUtil;
+    }
+
+    @RequestMapping(path="/callback", method = {RequestMethod.POST, RequestMethod.HEAD})
+    public void editCallBack(HttpServletRequest request, HttpServletResponse response) throws IOException {
+        PrintWriter writer = null;
+        try {
+            writer = response.getWriter();
+            // 获取传输的json数据
+            Scanner scanner = new Scanner(request.getInputStream()).useDelimiter("\\A");
+            String body = scanner.hasNext() ? scanner.next() : "";
+            JSONObject jsonObject = JSONObject.parseObject(body);
+            log.info("{}", jsonObject);
+
+            int status = (int) jsonObject.get("status");
+            String key = (String) jsonObject.get("key");
+
+            if (status == 6 || status == 2) {
+                String fileUrl = (String) jsonObject.get("url");
+                Resource resource = fileUtil.downloadFile(fileUrl);
+                ossUtil.uploadFile(resource.getInputStream(), key);
+            }
+
+        } catch (Exception e) {
+            log.error(e.getMessage());
+            writer.write("{\"error\":-1}");
+            return;
+        }
+        /*
+         * status = 1,我们给onlyOffice的服务返回{"error":"0"}的信息。
+         * 这样onlyOffice会认为回调接口是没问题的,这样就可以在线编辑文档了,否则的话会弹出窗口说明
+         */
+        if (Objects.nonNull(writer)) {
+            writer.write("{\"error\":0}");
+        }
+    }
+
+    @PostMapping("/forcesave")
+    public MyResponse forceSave(@RequestBody MyRequestObject requestObject) {
+        String url = "";
+        MyResponseObject response = webClientUtil.post(url, requestObject, MyResponseObject.class);
+        log.info(response.toString());
+        if (response.getError() != 0 && response.getError() != 4)
+            throw MyException.create(HttpStatus.INTERNAL_SERVER_ERROR, "服务器调用OnlyOffice内部错误");
+        if (response.getError() == 4)
+            throw MyException.create(HttpStatus.BAD_REQUEST, "OnlyOffice编辑器内容未修改");
+
+        return MyResponse.success("触发forceSave成功");
+    }
+
+    @Data
+    @AllArgsConstructor
+    static class MyRequestObject {
+        private String c;
+        private String key;
+    }
+
+    @Data
+    static class MyResponseObject {
+        private String key;
+        private int error;
+    }
+
+
+}

+ 8 - 2
src/main/java/com/njuzr/eaibackend/dto/AssignmentDTO.java

@@ -1,6 +1,8 @@
 package com.njuzr.eaibackend.dto;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.njuzr.eaibackend.enums.AssignmentStatus;
+import jakarta.validation.constraints.NotNull;
 import lombok.Data;
 
 import java.util.Date;
@@ -14,17 +16,21 @@ import java.util.List;
 
 @Data
 public class AssignmentDTO {
+    @NotNull(message = "作业名称不能缺失")
     private String assignmentName;
 
+    @NotNull(message = "作业描述不能缺失")
     private String description;
 
     private String descriptionFile; // 作业要求,Word/Pdf文件
 
     private List<String> attachments; // 作业附件
 
-    private Long publisher; // 发布作业的老师的Id
-
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
+    @NotNull(message = "起始时间不能缺失")
     private Date startTime;
 
+    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
+    @NotNull(message = "结束时间不能缺失")
     private Date endTime;
 }

+ 15 - 0
src/main/java/com/njuzr/eaibackend/dto/ForceSave.java

@@ -0,0 +1,15 @@
+package com.njuzr.eaibackend.dto;
+
+import lombok.Data;
+
+/**
+ * @author: Leonezhurui
+ * @Date: 2024/3/14 - 10:59
+ * @Package: EAI-Backend
+ */
+
+@Data
+public class ForceSave {
+    private String c;
+    private String key;
+}

+ 15 - 0
src/main/java/com/njuzr/eaibackend/mapper/StudentAssignmentMapper.java

@@ -0,0 +1,15 @@
+package com.njuzr.eaibackend.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.njuzr.eaibackend.po.StudentAssignment;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * @author: Leonezhurui
+ * @Date: 2024/3/15 - 00:46
+ * @Package: EAI-Backend
+ */
+
+@Mapper
+public interface StudentAssignmentMapper extends BaseMapper<StudentAssignment> {
+}

+ 4 - 4
src/main/java/com/njuzr/eaibackend/po/Assignment.java

@@ -22,21 +22,21 @@ public class Assignment {
     @TableId(type = IdType.AUTO)
     private Long assignmentId;
 
+    private Long courseId; // 外键!
+
     private String assignmentName;
 
     private String description;
 
     private String descriptionFile; // 作业要求,Word/Pdf文件
 
-    private List<String> attachments; // 作业附件
+    private String attachments; // 作业附件
 
-    private Long publisher; // 发布作业的老师的Id
+    private Long teacherId; // 发布作业的老师的Id
 
     private Date startTime;
 
     private Date endTime;
 
     private Date createTime;
-
-    private AssignmentStatus status;
 }

+ 3 - 0
src/main/java/com/njuzr/eaibackend/po/StudentAssignment.java

@@ -3,6 +3,7 @@ package com.njuzr.eaibackend.po;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.njuzr.eaibackend.enums.AssignmentStatus;
 import lombok.Data;
 
 /**
@@ -20,4 +21,6 @@ public class StudentAssignment {
     private Long userId;
     private Double score;
     private String remark;
+    private String fileUrl; // 学生作业的oss链接
+    private AssignmentStatus status; // 学生作业状态
 }

+ 16 - 0
src/main/java/com/njuzr/eaibackend/service/AssignmentService.java

@@ -0,0 +1,16 @@
+package com.njuzr.eaibackend.service;
+
+import com.njuzr.eaibackend.dto.AssignmentDTO;
+import com.njuzr.eaibackend.po.MyUserDetails;
+import com.njuzr.eaibackend.vo.AssignmentVO;
+
+/**
+ * @author: Leonezhurui
+ * @Date: 2024/3/15 - 00:40
+ * @Package: EAI-Backend
+ */
+
+public interface AssignmentService {
+
+    AssignmentVO createAssignment(MyUserDetails user, Long courseId, AssignmentDTO assignmentDTO);
+}

+ 80 - 0
src/main/java/com/njuzr/eaibackend/service/impl/AssignmentServiceImpl.java

@@ -0,0 +1,80 @@
+package com.njuzr.eaibackend.service.impl;
+
+import com.njuzr.eaibackend.dto.AssignmentDTO;
+import com.njuzr.eaibackend.enums.Role;
+import com.njuzr.eaibackend.exception.MyException;
+import com.njuzr.eaibackend.mapper.AssignmentMapper;
+import com.njuzr.eaibackend.mapper.CourseMapper;
+import com.njuzr.eaibackend.mapper.StudentAssignmentMapper;
+import com.njuzr.eaibackend.po.Assignment;
+import com.njuzr.eaibackend.po.Course;
+import com.njuzr.eaibackend.po.MyUserDetails;
+import com.njuzr.eaibackend.service.AssignmentService;
+import com.njuzr.eaibackend.utils.ConvertUtil;
+import com.njuzr.eaibackend.vo.AssignmentVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.http.HttpStatus;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author: Leonezhurui
+ * @Date: 2024/3/15 - 00:40
+ * @Package: EAI-Backend
+ */
+
+@Slf4j
+@Service
+public class AssignmentServiceImpl implements AssignmentService {
+
+    private final AssignmentMapper assignmentMapper;
+    private final CourseMapper courseMapper;
+
+    public AssignmentServiceImpl(AssignmentMapper assignmentMapper, CourseMapper courseMapper) {
+        this.assignmentMapper = assignmentMapper;
+        this.courseMapper = courseMapper;
+    }
+
+    @Override
+    public AssignmentVO createAssignment(MyUserDetails user, Long courseId, AssignmentDTO assignmentDTO) {
+        Course course = courseMapper.selectById(courseId);
+        if (course == null)
+            throw MyException.create(HttpStatus.BAD_REQUEST, "课程不存在");
+
+        if (user.getRole() != Role.ADMIN && !course.getTeacherIds().contains(String.valueOf(user.getId())))
+            throw MyException.create(HttpStatus.BAD_REQUEST, "无权限创建");
+
+        Assignment target = convertToPO(assignmentDTO);
+        target.setCourseId(courseId);
+        target.setTeacherId(user.getId());
+
+        try {
+            int code = assignmentMapper.insert(target);
+            if (code == 0)
+                throw MyException.create(HttpStatus.INTERNAL_SERVER_ERROR, "创建作业失败");
+        } catch (Exception e) {
+            log.error(e.getMessage());
+            throw MyException.create(HttpStatus.INTERNAL_SERVER_ERROR, "创建作业失败");
+        }
+        return convertToVO(target);
+    }
+
+
+
+    private Assignment convertToPO(AssignmentDTO assignmentDTO) {
+        Assignment assignment = new Assignment();
+        BeanUtils.copyProperties(assignmentDTO, assignment);
+        if (assignmentDTO.getAttachments() != null)
+            assignment.setAttachments(ConvertUtil.listToString(assignmentDTO.getAttachments()));
+        return assignment;
+    }
+
+    private AssignmentVO convertToVO(Assignment assignment) {
+        AssignmentVO res = new AssignmentVO();
+        BeanUtils.copyProperties(assignment, res);
+        if (assignment.getAttachments() != null)
+            res.setAttachments(ConvertUtil.stringToList(assignment.getAttachments(), String::valueOf));
+
+        return res;
+    }
+}

+ 25 - 0
src/main/java/com/njuzr/eaibackend/utils/FileUtil.java

@@ -0,0 +1,25 @@
+package com.njuzr.eaibackend.utils;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.core.io.Resource;
+import org.springframework.web.client.RestTemplate;
+
+/**
+ * @author: Leonezhurui
+ * @Date: 2024/3/15 - 01:39
+ * @Package: EAI-Backend
+ */
+
+@Slf4j
+public class FileUtil {
+
+    public Resource downloadFile(String fileUrl) {
+        try {
+            RestTemplate restTemplate = new RestTemplate();
+            return restTemplate.getForObject(fileUrl, Resource.class);
+        } catch (Exception e) {
+            log.error(e.getMessage());
+        }
+        return null;
+    }
+}

+ 96 - 0
src/main/java/com/njuzr/eaibackend/utils/OssUtil.java

@@ -0,0 +1,96 @@
+package com.njuzr.eaibackend.utils;
+
+import com.aliyun.oss.HttpMethod;
+import com.aliyun.oss.OSS;
+import com.aliyun.oss.OSSClientBuilder;
+import com.aliyun.oss.model.GeneratePresignedUrlRequest;
+import com.aliyun.oss.model.OSSObjectSummary;
+import com.aliyun.oss.model.ObjectListing;
+import com.njuzr.eaibackend.exception.MyException;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.http.HttpStatus;
+import org.springframework.stereotype.Component;
+
+import java.io.InputStream;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author: Leonezhurui
+ * @Date: 2024/3/13 - 08:57
+ * @Package: EAI-Backend
+ */
+
+@Slf4j
+@Component
+public class OssUtil {
+    @Value("${aliyun.oss.bucketName}")
+    private String bucketName;
+
+    private final OSS ossClient;
+
+    @Autowired
+    public OssUtil(OSS ossClient) {
+        this.ossClient = ossClient;
+    }
+
+    // 上传文件
+    public String uploadFile(InputStream inputStream, String filePath) {;
+        try {
+            ossClient.putObject(bucketName, filePath, inputStream);
+            // 默认情况下URL有效期是3600秒
+            Date expiration = new Date(new Date().getTime() + 3600 * 1000);
+            URL url = ossClient.generatePresignedUrl(bucketName, filePath, expiration);
+            return url.toString();
+        } catch (Exception e) {
+            log.error("服务器上传文件出错"+e.getMessage());
+            throw MyException.create(HttpStatus.INTERNAL_SERVER_ERROR, "服务器上传文件出错");
+        }
+    }
+
+    /**
+     * 生成文件的预签名URL以供下载
+     * @param filePath 文件在OSS上的路径
+     * @param expirationTime 过期时间(单位:毫秒)
+     * @return 预签名URL
+     */
+    public String generatePresignedUrl(String filePath, long expirationTime) {
+        // 设置URL过期时间
+        Date expiration = new Date(new Date().getTime() + expirationTime);
+        // 生成URL
+        GeneratePresignedUrlRequest request = new GeneratePresignedUrlRequest(bucketName, filePath, HttpMethod.GET);
+        request.setExpiration(expiration);
+        URL url = ossClient.generatePresignedUrl(request);
+        return url.toString();
+    }
+
+    // 列出文件
+    public List<String> listFiles() {
+        try {
+            List<String> fileNames = new ArrayList<>();
+            ObjectListing objectListing = ossClient.listObjects(bucketName);
+            for (OSSObjectSummary objectSummary : objectListing.getObjectSummaries()) {
+                fileNames.add(objectSummary.getKey());
+            }
+            return fileNames;
+        } catch (Exception e) {
+            log.error("服务器获取文件列表错误:"+e.getMessage());
+            throw MyException.create(HttpStatus.INTERNAL_SERVER_ERROR, "服务器获取文件列表错误");
+        }
+    }
+
+    // 删除文件
+    public void deleteFile(String filePath) {
+        try {
+            ossClient.deleteObject(bucketName, filePath);
+        } catch (Exception e) {
+            log.error("服务器删除文件错误:"+e.getMessage());
+            throw MyException.create(HttpStatus.INTERNAL_SERVER_ERROR, "服务器删除文件错误");
+        }
+    }
+
+}

+ 10 - 1
src/main/java/com/njuzr/eaibackend/utils/WebClientUtil.java

@@ -3,11 +3,14 @@ package com.njuzr.eaibackend.utils;
 import io.netty.handler.ssl.SslContextBuilder;
 import io.netty.handler.ssl.util.InsecureTrustManagerFactory;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.http.MediaType;
 import org.springframework.http.client.reactive.ReactorClientHttpConnector;
 import org.springframework.web.reactive.function.client.WebClient;
 import org.springframework.web.reactive.function.client.WebClientResponseException;
 import reactor.netty.http.client.HttpClient;
 
+import java.nio.file.Path;
+
 /**
  * @author: Leonezhurui
  * @Date: 2024/2/25 - 16:52
@@ -18,6 +21,10 @@ import reactor.netty.http.client.HttpClient;
 public class WebClientUtil {
     private final WebClient webClient;
 
+    public WebClientUtil() {
+        this.webClient = WebClient.builder().build();
+    }
+
     // 构造函数,使用baseUrl初始化WebClient
     public WebClientUtil(String baseUrl) {
 //        SslContextBuilder sslContextBuilder = SslContextBuilder
@@ -51,7 +58,7 @@ public class WebClientUtil {
     }
 
     // POST请求方法
-    public <T, R> T post(String uri, R request, Class<T> responseType) {
+    public <T, R> T  post(String uri, R request, Class<T> responseType) {
         try {
             return this.webClient.post()
                     .uri(uri)
@@ -94,4 +101,6 @@ public class WebClientUtil {
         }
     }
 
+
+
 }

+ 33 - 0
src/main/java/com/njuzr/eaibackend/vo/AssignmentVO.java

@@ -0,0 +1,33 @@
+package com.njuzr.eaibackend.vo;
+
+import lombok.Data;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author: Leonezhurui
+ * @Date: 2024/3/15 - 00:42
+ * @Package: EAI-Backend
+ */
+
+@Data
+public class AssignmentVO {
+    private Long assignmentId;
+
+    private String assignmentName;
+
+    private String description;
+
+    private String descriptionFile; // 作业要求,Word/Pdf文件
+
+    private List<String> attachments; // 作业附件
+
+    private Long publisher; // 发布作业的老师的Id
+
+    private Date startTime;
+
+    private Date endTime;
+
+    private Date createTime;
+}

+ 10 - 0
src/main/resources/application-dev.yaml

@@ -31,6 +31,16 @@ jwt:
   issuer: eai
   expiration: 86400
 
+aliyun:
+  oss:
+    endpoint: oss-cn-shanghai.aliyuncs.com
+    accessKeyId: LTAI5tKsfJJKByjVqNKCvRR3
+    accessKeySecret: fckFhhxhG234aOZfjIAxZZuFA3RCkH
+    bucketName: eai-files
+
+files:
+
+
 
 logging:
   config: classpath:log4j2-dev.xml