|
|
package com.ui.ctrl.type;
|
|
|
|
|
|
import com.ui.contants.HttpUriContants;
|
|
|
import com.ui.http.HttpRestClient;
|
|
|
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.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
|
/**
|
|
|
* Created by fruwei on 2016/6/16.
|
|
|
*/
|
|
|
@Controller
|
|
|
@RequestMapping("type")
|
|
|
public class TypeCtrl {
|
|
|
Logger logger = LoggerFactory.getLogger(TypeCtrl.class);
|
|
|
|
|
|
@Autowired
|
|
|
private HttpRestClient httpClient;
|
|
|
|
|
|
@RequestMapping("/all")
|
|
|
@ResponseBody
|
|
|
public String getAllType(){
|
|
|
String strType="";
|
|
|
|
|
|
logger.debug("get all type");
|
|
|
|
|
|
strType=httpClient.defaultGet(HttpUriContants.GET_ALL_TYPE, String.class);
|
|
|
|
|
|
logger.info("all type: {}",strType);
|
|
|
|
|
|
return strType;
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|