SHARE
TWEET

Untitled

a guest Jul 22nd, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.restfull.core.controllers;
  2.  
  3. import java.util.List;
  4. import org.springframework.beans.factory.annotation.Autowired;
  5. import org.springframework.web.bind.annotation.GetMapping;
  6. import org.springframework.web.bind.annotation.RestController;
  7. import com.restfull.core.entities.Singer;
  8. import com.restfull.core.repository.SingerRepository;
  9.  
  10. @RestController
  11. public class SingerController {
  12.  
  13.     @Autowired
  14.     SingerRepository singerRepository;
  15.  
  16.     @GetMapping("/")
  17.     public List<Singer> query() {
  18.         return singerRepository.getAllSingers();
  19.     }
  20. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top