@Test public void readDeviceType() throws Exception { mockMvc.perform((get("/api/device/types"))).andExpect(status().isOk()) .andDo(print()); }
@RequestMapping(value = "/types", method = RequestMethod.GET) public @ResponseBody ResponseHeader readDeviceType() { ResponseHeader header = new ResponseHeader(); header.setCode(RESPONSE_OK); List<DeviceType> deviceTypeList = deviceTypeDao.getDeviceTypeList(); header.setResult(deviceTypeList); return header; }
DeviceController { @RequestMapping(value = "/types", method = RequestMethod.GET) public @ResponseBody ResponseHeader readDeviceType() { ResponseHeader header = new ResponseHeader(); header.setCode(RESPONSE_OK); List<DeviceType> deviceTypeList = deviceTypeDao.getDeviceTypeList(); header.setResult(deviceTypeList); return header; } }
DeviceController { @RequestMapping(value = "/types", method = RequestMethod.GET) public @ResponseBody ResponseHeader readDeviceType() { ResponseHeader header = new ResponseHeader(); header.setCode(RESPONSE_OK); List<DeviceType> deviceTypeList = deviceTypeDao.getDeviceTypeList(); header.setResult(deviceTypeList); return header; }  }
DeviceController { @RequestMapping(value = "/types", method = RequestMethod.GET) public @ResponseBody ResponseHeader readDeviceType() { ResponseHeader header = new ResponseHeader(); header.setCode(RESPONSE_OK); List<DeviceType> deviceTypeList = deviceTypeDao.getDeviceTypeList(); header.setResult(deviceTypeList); return header; }  @RequestMapping(value = "/types", method = RequestMethod.GET) @ResponseBody ResponseHeader readDeviceType(); @RequestMapping(value = "/brands", method = RequestMethod.POST) @ResponseBody ResponseHeader readBrands(@RequestParam(value = "type_id", required = true) int typeid); @RequestMapping(value = "/key_test", method = RequestMethod.POST) @ResponseBody ResponseHeader readKeyTests(
            @RequestParam(value = "type_id", required = true) int typeId,
            @RequestParam(value = "brand_id", required = true) int brandId); @RequestMapping(value = "/key_list", method = RequestMethod.POST) @ResponseBody ResponseHeader readKeyList(
            @RequestParam(value = "device_id", required = true) int deviceId); @RequestMapping(value = "/key_data", method = RequestMethod.POST) @ResponseBody ResponseHeader readDeviceKeyData(
            @RequestParam(value = "device_id", required = true) int deviceId,
            @RequestParam(value = "cmd", required = true) String cmd); @RequestMapping(value = "/air_data", method = RequestMethod.POST) @ResponseBody ResponseHeader readAirKeyData(
            @RequestParam(value = "device_id", required = true) int deviceId,
            @RequestParam(value = "cmd", required = true) String cmd,
            @RequestParam(value = "temp", required = true) String temp); }
DeviceController { @RequestMapping(value = "/types", method = RequestMethod.GET) public @ResponseBody ResponseHeader readDeviceType() { ResponseHeader header = new ResponseHeader(); header.setCode(RESPONSE_OK); List<DeviceType> deviceTypeList = deviceTypeDao.getDeviceTypeList(); header.setResult(deviceTypeList); return header; }  @RequestMapping(value = "/types", method = RequestMethod.GET) @ResponseBody ResponseHeader readDeviceType(); @RequestMapping(value = "/brands", method = RequestMethod.POST) @ResponseBody ResponseHeader readBrands(@RequestParam(value = "type_id", required = true) int typeid); @RequestMapping(value = "/key_test", method = RequestMethod.POST) @ResponseBody ResponseHeader readKeyTests(
            @RequestParam(value = "type_id", required = true) int typeId,
            @RequestParam(value = "brand_id", required = true) int brandId); @RequestMapping(value = "/key_list", method = RequestMethod.POST) @ResponseBody ResponseHeader readKeyList(
            @RequestParam(value = "device_id", required = true) int deviceId); @RequestMapping(value = "/key_data", method = RequestMethod.POST) @ResponseBody ResponseHeader readDeviceKeyData(
            @RequestParam(value = "device_id", required = true) int deviceId,
            @RequestParam(value = "cmd", required = true) String cmd); @RequestMapping(value = "/air_data", method = RequestMethod.POST) @ResponseBody ResponseHeader readAirKeyData(
            @RequestParam(value = "device_id", required = true) int deviceId,
            @RequestParam(value = "cmd", required = true) String cmd,
            @RequestParam(value = "temp", required = true) String temp);  }