Guest User

Untitled

a guest
Mar 20th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. package com.github.ajanthan.pizza.shack.MenuService.service;
  2.  
  3. import com.github.ajanthan.pizza.shack.MenuService.dao.MenuItemRepository;
  4. import com.github.ajanthan.pizza.shack.MenuService.model.MenuItem;
  5. import org.springframework.beans.factory.annotation.Autowired;
  6. import org.springframework.boot.autoconfigure.security.oauth2.client.EnableOAuth2Sso;
  7. import org.springframework.web.bind.annotation.RequestMapping;
  8. import org.springframework.web.bind.annotation.RestController;
  9.  
  10. @RestController
  11. public class MenuItemService {
  12.  
  13. @Autowired
  14. private MenuItemRepository menuItemRepository;
  15.  
  16. @RequestMapping("/menu")
  17. public Iterable<MenuItem> getMenu() {
  18. return menuItemRepository.findAll();
  19. }
  20. }
Add Comment
Please, Sign In to add comment