1
0
mirror of https://github.com/FatttSnake/Pinnacle-OA.git synced 2026-04-05 06:51:23 +08:00

Added spring security

This commit is contained in:
2023-05-05 00:17:11 +08:00
parent c3bde66b33
commit e5317da56d
89 changed files with 1028 additions and 783 deletions

View File

@@ -1,8 +1,16 @@
package com.cfive.pinnacle.controller;
import com.cfive.pinnacle.entity.User;
import com.cfive.pinnacle.entity.common.ResponseCode;
import com.cfive.pinnacle.entity.common.ResponseResult;
import com.cfive.pinnacle.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* <p>
* 用户 前端控制器
@@ -14,5 +22,16 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/user")
public class UserController {
private IUserService userService;
@Autowired
public void setUserService(IUserService userService) {
this.userService = userService;
}
@GetMapping
public ResponseResult getAllUser() {
List<User> users = userService.list();
return ResponseResult.build(ResponseCode.DATABASE_SELECT_OK, "success", users);
}
}