change api scheme to /api/v1/feature and use construction injection instead of field injection
This commit is contained in:
parent
23affca287
commit
4d9f0fbb0e
|
@ -11,11 +11,15 @@ import java.util.Optional;
|
|||
import java.util.UUID;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/documents")
|
||||
@RequestMapping("/api/v1/documents")
|
||||
public class DocumentController {
|
||||
|
||||
private final DocumentService documentService;
|
||||
|
||||
@Autowired
|
||||
private DocumentService documentService;
|
||||
public DocumentController(DocumentService documentService) {
|
||||
this.documentService = documentService;
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
public List<Document> getAllDocuments() {
|
||||
|
|
|
@ -11,11 +11,15 @@ import java.util.Optional;
|
|||
import java.util.UUID;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/users")
|
||||
@RequestMapping("/api/v1/users")
|
||||
public class UserController {
|
||||
|
||||
private final UserService userService;
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
public UserController(UserService userService) {
|
||||
this.userService = userService;
|
||||
}
|
||||
|
||||
@GetMapping
|
||||
public List<User> getAllUsers() {
|
||||
|
|
Loading…
Reference in a new issue