TestCtrl.java
1.04 KB
package com.ui.ctrl;
import com.ui.http.HttpRestClient;
import com.ui.model.BaseResponse;
import com.ui.test.TestCommonAlarmData;
import com.ui.test.TestCommonData;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
/**
* 测试转用
*/
@Controller
@RequestMapping("testcommon")
public class TestCtrl {
Logger log = LoggerFactory.getLogger("apiTestLogger");
@Autowired
private HttpRestClient httpClient;
@RequestMapping("/testUpLoadData")
@ResponseBody
public BaseResponse<?> testUpLoadData(@RequestBody TestCommonData<TestCommonAlarmData> data) {
log.info(" ------request:" + data.toString());
httpClient.defaultPost("/commonAlarmData/upLoadData",data,BaseResponse.class);
return new BaseResponse<>();
}
}