package com.lovenav.controller; import com.lovenav.entity.Comment; import com.lovenav.service.CommentService; import com.lovenav.service.serviceImpl.CommentServiceImpl; import org.springframework.stereotype.Component; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class CommentComtroller { private CommentServiceImpl commentServiceImpl; @PostMapping(value= "/AddLikeCount",produces="application/json;charset=UTF-8") public int AddLikeCount(@RequestBody Comment comment) { return commentServiceImpl.AddLikeCount(comment); } }