whycxzp
2020-12-11 c2dc64cbefd901ef194c8d7497b4cfb9f3fccc95
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
package com.yckj.controller;
 
import com.yckj.pojo.User;
import com.yckj.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
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;
 
import javax.annotation.Resource;
 
@RestController
@RequestMapping("user")
@Api(tags = "用户")
public class UserController {
 
    @Resource
    private UserService userService;
 
    @PostMapping("/")
    @ApiOperation(value = "添加")
    public boolean add(@RequestBody User user){
        return userService.add(user);
    }
}