「网站回复java」网站回复访问的通知
今天给各位分享网站回复java的知识,其中也会对网站回复访问的通知进行解释,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!
本文目录一览:
- 1、java web 评论及回复系统
- 2、JavaWeb中怎么设计回复评论的功能
- 3、我想运用java实现网站自动回帖技术,我是学习软件技术的,有些东西学的不深,希望可以给个指教
- 4、用java web做一个网站,想实现"提问,回复"的功能,想用mvc模式做,请问谁有代码吗
java web 评论及回复系统
评论肯定是基于文章的,文章肯定有唯一的ID。
这样的话,可以让评论全部关联到这个ID上。
随便写写,代码不能运行,参考即可。
public class Comment {
Long id;
Article article;//文章
User user;//用户
Date date;//时间
String content;//内容
}
public class CommentService {
void addComment(Article article, User user, String content);
void updateComment(Comment comment);
void deleteComment(Comment commnet);
ListComment findCommentByArticle(Article article);
ListComment findCommentByUser(User user);
}
public class AddCommentAction {
private Long articleId;
private Long userId;
private String content;
public String execute() {
Article article = articleService.getArticle(articleId);
User user = userService.getUser(userId);
commentService.addComment(article, user, comment);
return SUCCESS;
}
}
JavaWeb中怎么设计回复评论的功能
在回复按钮或者HREF上通过action将发帖人的id和帖子id传出去,获取到id来判断本次回复是针对那个人发的哪一个帖子的。
我想运用java实现网站自动回帖技术,我是学习软件技术的,有些东西学的不深,希望可以给个指教
得看具体的情况,,,,,,简单的,可以运用java.net.HttpURLConnection模拟 POST
~
~
~
用java web做一个网站,想实现"提问,回复"的功能,想用mvc模式做,请问谁有代码吗
m(model)模型,代表的是数据库层,通常用到的是:oracle、db2、mysql等sql知识;
v(view)视图,代表的是页面(相关),通常用到的是:html5、jsp,js等页面知识;c(Controller)控制,代表的控制器,通常用到一些框架知识,如ssh(struts,spring,hibernate)。
备注:mvc实际上是一个很宽泛的内容,根据用到的技术不同,需要实现的业务逻辑不一样,所以灵活开发配置即可。
网站回复java的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于网站回复访问的通知、网站回复java的信息别忘了在本站进行查找喔。
发布于:2022-12-01,除非注明,否则均为
原创文章,转载请注明出处。