1.前台ajax
$.ajax({
url:"/GetCommentContent",
type:"post",
data: {
},
dataType:"json",
async: true,
//将后端传回的数据,用于渲染评论区
success:function(data){
console.log(data);
}
});
2.后端springmvc
@Controller
public class CommentController {
private ProcessComment processComment = new ProcessComment();
//获取所有评论
@RequestMapping(value =</