Created
July 28, 2021 15:22
-
-
Save sabbarmehdi/eb38907bf95e92ba5fbcf484cdbdb46e to your computer and use it in GitHub Desktop.
feign
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RestController | |
@RequestMapping("/item") | |
@RepositoryRestController | |
@RequiredArgsConstructor | |
public class ItemController { | |
@Autowired | |
ItemService itemService; | |
@GetMapping(value = "/user-items") | |
public ResponseEntity<List<Item>> getItemByUserId(@RequestParam(value = "userId") Long userId){ | |
return new ResponseEntity<List<Item>>(itemService.findAllItemsByUserId(userId), HttpStatus.OK); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment