Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
}
|
23
src/main/java/com/lovenav/controller/CommentController.java
Normal file
23
src/main/java/com/lovenav/controller/CommentController.java
Normal 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!";
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user