NoticeController.java 974 B

123456789101112131415161718192021222324252627
  1. package com.fdkankan.manage_jp.controller;
  2. import com.fdkankan.fyun.face.FYunFileServiceInterface;
  3. import com.fdkankan.manage_jp.common.Result;
  4. import com.fdkankan.manage_jp.config.FyunConfig;
  5. import com.fdkankan.manage_jp.config.ManageConfig;
  6. import lombok.extern.slf4j.Slf4j;
  7. import org.springframework.beans.factory.annotation.Autowired;
  8. import org.springframework.web.bind.annotation.GetMapping;
  9. import org.springframework.web.bind.annotation.RequestMapping;
  10. import org.springframework.web.bind.annotation.RestController;
  11. @RestController
  12. @RequestMapping("/manage_jp/notice")
  13. @Slf4j
  14. public class NoticeController {
  15. @Autowired
  16. ManageConfig manageConfig;
  17. @Autowired
  18. FYunFileServiceInterface fYunFileServiceInterface;
  19. @GetMapping("/notice")
  20. public Result notice(){
  21. String ossPath = "/manage/version/"+manageConfig.getActive() +"/manage-version.json";
  22. return Result.success(fYunFileServiceInterface.getFileContent(ossPath));
  23. }
  24. }