diff --git a/src/main/java/kr/ajousw/myspringweb/controller/MyWebController.java b/src/main/java/kr/ajousw/myspringweb/controller/MyWebController.java index 5e6a55532e9d06e52d0184136369c9ab6d649a3a..3c395ad34ef2505a58bebef0e6fa67f1322e32b5 100644 --- a/src/main/java/kr/ajousw/myspringweb/controller/MyWebController.java +++ b/src/main/java/kr/ajousw/myspringweb/controller/MyWebController.java @@ -66,16 +66,17 @@ public class MyWebController { } // // Get Favorite Music list from Database - // @GetMapping(value="/likes") - // public List<FavoriteMusic> getLikes() { + @GetMapping(value="/likes") + public List<FavoriteMusic> getLikes() { - // try { - // return albumsRepo.findAll(); + try { + return albumsRepo.findAll(); - // } catch (Exception e) { - // System.out.println(e.toString()); - // return null; - // } + } catch (Exception e) { + System.out.println(e.toString()); + return null; + } + } @PostMapping(value="/likes") diff --git a/target/classes/kr/ajousw/myspringweb/controller/MyWebController.class b/target/classes/kr/ajousw/myspringweb/controller/MyWebController.class index 03bfea4309e45d9253a269604c224266f39def7a..8bb3230126b57b13e2c74cd44628d9a5bbb46abb 100644 Binary files a/target/classes/kr/ajousw/myspringweb/controller/MyWebController.class and b/target/classes/kr/ajousw/myspringweb/controller/MyWebController.class differ