点赞++2

This commit is contained in:
sjm
2023-12-20 20:48:17 +08:00
parent 09165ec608
commit 67530a8c90
7 changed files with 91 additions and 28 deletions

View File

@@ -0,0 +1,23 @@
package com.lovenav.controller;
import com.lovenav.entity.Comment;
import com.lovenav.service.serviceImpl.CommentServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/comment")
public class CommentController {
@Autowired
private CommentServiceImpl commentServiceImpl;
@PostMapping(value= "/AddLikeCount",produces="application/json;charset=UTF-8")
public String AddLikeCount(@RequestBody Comment comment) {
return commentServiceImpl.AddLikeCount(comment);
}
@GetMapping("/hello")
public String he(){
System.out.println("hello world");
return "Hello world!";
}
}