Postman教程使用

    科技2024-04-12  79

    说明:

    1.看注解是不是@postMapping或者是@GetMapping 2.请求方式由接收方(控制器)这边决定的 3.json字符串是String类型:{”name“:“zs”},如果是int类型{”id“:1}

    方法1:

    @Controller public class UserController { @Autowired private UserService userService; @RequestMapping("/test") @ResponseBody public void test( User user) { int i = userService.addUser(user);
    Processed: 0.013, SQL: 8