IClearExportInterface.java 1.33 KB
package com.erry.iclear.dateInterface.controller;

import com.erry.iclear.dateInterface.service.IClearApiSystemService;
import io.swagger.annotations.ApiOperation;
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;

/**
 * @author Administrator
 */
@RestController
@RequestMapping("/system")
@Slf4j
public class IClearExportInterface {

    @Autowired
    private IClearApiSystemService iClearApiSystemService;


    @ApiOperation(value = "IClear 健康检查", httpMethod = "GET", notes = "ex:  http://localhost:8080/system/healthCheck")
    @GetMapping("/healthCheck")
    public String healthCheck() {
        return "iClearApi 当前时间:" + System.currentTimeMillis();
    }


    @ApiOperation(value = "IClear 刷新缓存", httpMethod = "GET", notes = "ex:  http://192.168.1.75:8080/system/refreshAppInfoCache")
    @GetMapping("/refreshAppInfoCache")
    public String refreshCache() {
        try{
            iClearApiSystemService.refreshAppInfoCache();
            return "Success";
        }catch (Exception e){
            log.error("refreshCache() error:"+e.getMessage());
        }
        return "Faile";
    }

}