TestController.java 890 Bytes
package cn.com.glsx.consumer;

import cn.com.glsx.consumer.service.InfoService;
import com.alibaba.nacos.common.utils.MD5Utils;
import lombok.extern.slf4j.Slf4j;
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.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author zhouhaibao
 * @date 2021/3/15 17:46
 */
@Controller
@RequestMapping("/test")
@Slf4j
public class TestController {

    @Autowired
    private InfoService infoService;

    @RequestMapping(value = "/test",method = {RequestMethod.POST})
    @ResponseBody
    public void test(@RequestBody String json) {
        infoService.processMessage(json);
    }

}