liurunyu
2024-05-18 d50b97408847b6b0f8532a7b6bbf3d2dbb228df8
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
package com.dy.pipIrrMwTestWeb.test;
 
import com.dy.common.mw.protocol.Data;
import com.dy.common.webUtil.BaseResponse;
import com.dy.common.webUtil.BaseResponseUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
/**
 * @Author: liurunyu
 * @Date: 2024/5/18 11:04
 * @Description
 */
@Slf4j
@RestController
@RequestMapping(path="comRes")
@SuppressWarnings("unchecked")//java版本越高,对泛型约束越严,所以配置SuppressWarnings("unchecked")
public class CommandResultCtrl {
 
    @PostMapping(path = "receive", consumes = MediaType.APPLICATION_JSON_VALUE)
    public BaseResponse<String> receive(@RequestBody Data data) {
        log.info(data.toString()) ;
        return BaseResponseUtils.buildSuccess("ok");
    }
}