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);
|
}
|
}
|