All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.jiangzeyin.controller.api.PageTemplateControl Maven / Gradle / Ivy

package cn.jiangzeyin.controller.api;

import cn.jiangzeyin.common.JsonMessage;
import cn.jiangzeyin.system.SystemBean;
import cn.jiangzeyin.system.cache.PageTemplateCache;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author jiangzeyin
 * Created by jiangzeyin on 2017/2/6.
 */
@Controller
@RequestMapping(value = SystemApiControl.SYSTEM_API_START_URL)
public class PageTemplateControl extends SystemApiControl {

    @RequestMapping(value = REFRESH_PAGE_CACHE)
    @ResponseBody
    public String page_cache(String token) {
        if (SystemBean.getInstance().systemApiToken.equals(token)) {
            PageTemplateCache.init();
            return JsonMessage.getString(200, "ok");
        }
        return JsonMessage.getString(400, "token not true");
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy