ElbInfoCtrl.java
1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.ui.ctrl;
import com.ui.contants.HttpUriContants;
import com.ui.http.HttpRestClient;
import com.ui.model.BaseResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
/**
* Created by xh on 2017/6/16.
*/
@RestController
@RequestMapping(value = "/elbInfo")
public class ElbInfoCtrl {
@Autowired
private HttpRestClient httpClient;
/**
* 跳转到页面
* @param model
* @return
*/
@RequestMapping("/toElbInfoPage")
public ModelAndView toElbInfoPage(Model model) {
return new ModelAndView("manager/elbinfo");
}
@RequestMapping("/getElbInfo")
@ResponseBody
public BaseResponse<?> getElbInfo(int cloudType) {
BaseResponse<?> response = httpClient.defaultPost(
HttpUriContants.GET_CLOUD_ELB_INFO + "?cloudType="+cloudType, null,
BaseResponse.class);
return response;
}
}