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

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

package cn.jiangzeyin.controller.api;

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

/**
 * @author jiangzeyin
 * Created by jiangzeyin on 2017/2/14.
 */
@Controller
@RequestMapping(SystemApiControl.SYSTEM_API_START_URL)
public class ShutDownControl extends SystemApiControl {

    @RequestMapping(value = SHUTDOWN_APPLICATION)
    public String shutdown(String token) {
        if (SystemBean.getInstance().systemApiToken.equals(token)) {
            System.exit(-1);
        }
        return JsonMessage.getString(400, "token not true");
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy