Created
July 28, 2021 16:01
-
-
Save sabbarmehdi/66c43299a92ba9de587dda0a3160f879 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
@Service | |
public class UserService{ | |
@Autowired | |
private ItemsServiceClient itemsServiceClient; | |
@Autowired | |
protected UserRepository userRepository; | |
public List<Item> findAllItemById() { | |
Long userId = userRepository.findByEmail(getUsername()).get().getId(); | |
List<Item> itemList= itemsServiceClient.getItems(userId); | |
return itemList; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment