Commit 36ee086d by 111-PC\111

[+]代码规范

1 parent 4bd8993b
package cn.com.glsx.consumer;
import cn.com.glsx.consumer.client.SmartPlatformClient;
import cn.com.glsx.consumer.service.DeviceService;
import cn.com.glsx.consumer.service.InfoService;
import com.alibaba.nacos.common.utils.MD5Utils;
import lombok.extern.slf4j.Slf4j;
......@@ -8,6 +10,7 @@ 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.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
/**
......@@ -22,10 +25,20 @@ public class TestController {
@Autowired
private InfoService infoService;
@Autowired
private DeviceService deviceService;
@RequestMapping(value = "/test",method = {RequestMethod.POST})
@ResponseBody
public void test(@RequestBody String json) {
infoService.processMessage(json);
}
@RequestMapping(value = "/test1",method = {RequestMethod.GET})
@ResponseBody
public void test1(@RequestParam String id) {
System.out.println(deviceService.getDeviceName(id));
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!