OpenFeign 传递对象类型普通表单数据

来自姬鸿昌的知识库
Jihongchang讨论 | 贡献2023年3月28日 (二) 07:25的版本
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳到导航 跳到搜索

https://www.bilibili.com/video/BV1My4y1W7vy?p=7

被调用 application service 的一方

DemoController.java

package io.github.jihch.controller;

import io.github.jihch.pojo.People;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@RestController
public class DemoController {

    @RequestMapping("/newDemo6")
    public People newDemo6(People people) {
        return people;
    }

}