Spring Security 변경
This commit is contained in:
@@ -11,6 +11,7 @@ import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.annotation.Secured;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
@@ -18,7 +19,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/mgmt/servers")
|
||||
@RequestMapping("/servers")
|
||||
public class ServerRestController {
|
||||
|
||||
private final ServerMgmtService serverMgmtService;
|
||||
@@ -31,6 +32,7 @@ public class ServerRestController {
|
||||
}
|
||||
|
||||
@GetMapping("/list.do")
|
||||
@Secured("ROLE_API_TESTER")
|
||||
public ResponseEntity<List<ServerDTO>> listView(@ModelAttribute("serverSearch") ServerSearch serverSearch, ModelMap model, Pageable pageable) {
|
||||
Page<Server> page = serverMgmtService.findAll(serverSearch.buildSpecification(), pageable);
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
|
||||
Reference in New Issue
Block a user