|
|
@@ -1,28 +0,0 @@
|
|
|
-package com.seecoder.BlueWhale.controller;
|
|
|
-
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
-
|
|
|
-import com.seecoder.BlueWhale.service.CommentService;
|
|
|
-import com.seecoder.BlueWhale.vo.ResultVO;
|
|
|
-
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
-
|
|
|
-
|
|
|
-@RestController
|
|
|
-@RequestMapping("/api/comments")
|
|
|
-public class CommentController {
|
|
|
-
|
|
|
- @Autowired
|
|
|
- CommentService commentService;
|
|
|
-
|
|
|
- @GetMapping("/{id}")
|
|
|
- public ResultVO<List<String>> getComments(@PathVariable(value = "id") Integer id) {
|
|
|
- return ResultVO.buildSuccess(commentService.findComments(id));
|
|
|
- }
|
|
|
-
|
|
|
-}
|