CompareIpsCtrl.java 962 Bytes
package com.ui.ctrl;

import com.ui.http.HttpRestClient;
import com.ui.model.BaseResponse;
import com.ui.model.req.CompareReq;
import com.ui.model.req.NginxSyncTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

/**
 * Created by yoho on 2016/8/23.
 */
@RestController
@RequestMapping(value = "/compareIps")
public class CompareIpsCtrl {

    @Autowired
    HttpRestClient httpRestClient;

    @RequestMapping("/toCompareIps")
    public ModelAndView toCompareIpsView() {
        return new  ModelAndView("compare/compareIps");
    }


    @RequestMapping("/compare")
    public BaseResponse pushTask(CompareReq req)
    {
        BaseResponse response = httpRestClient.defaultPost("/compareIps/compare", req, BaseResponse.class);

        return response;
    }
}