package com.fdkankan.manage_jp.controller; import com.fdkankan.fyun.face.FYunFileServiceInterface; import com.fdkankan.manage_jp.common.Result; import com.fdkankan.manage_jp.config.FyunConfig; import com.fdkankan.manage_jp.config.ManageConfig; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/manage_jp/notice") @Slf4j public class NoticeController { @Autowired ManageConfig manageConfig; @Autowired FYunFileServiceInterface fYunFileServiceInterface; @GetMapping("/notice") public Result notice(){ String ossPath = "/manage/version/"+manageConfig.getActive() +"/manage-version.json"; return Result.success(fYunFileServiceInterface.getFileContent(ossPath)); } }