毕业生做了这个考研论坛系统,使用的是SSM框架和JSP技术
一、系统截图
二、系统架构
系统架构:本系统使用Java作为主要的编程语言编程开发,后台以SSM框架作为主要的技术支撑,数据库采用采用MySQL,前端采用JSP同时配合JavaScript语言,同时引入百度的Ueditor编辑器丰富页面的内容。
开发环境:JDK8+IDEA+MySQL8.0
系统分析前台与后台两部分
前台为用户操作
1查看不同板块下边的不同类别的考研文章
2查看后台管理员发布的考研资讯
3查看后台管理员发布的考研链接
4查看考研文章的用户评论信息
4通过输入用户名,姓名,密码,头像等基本的信息完成用户注册
5通过用户名、密码、验证码完成登录。
6登陆后发布意见建议等到管理员的回复
7登陆后发布自己的考研经验文章
8登陆后对别人发布的文章进行评论
9登陆后对别人的评论进行点赞
10对于别的用户可以关注,屏蔽,举报,私信等交流
8个人中心
(1)用户中心 --查看自己发布的贴子以及评论的帖子
(2)基本设置 --修改个人的基本信息
(3)版主申请 --可以对某个板块的版主权限申请以及查看管理员的审核状态
(4)我的关注 --查看我关注的用户同时可以取消关注
(5)屏蔽用户 --查看我屏蔽的用户同时可以解除屏蔽
(6)我的私信 --查看我的私信信息以及回复信息
后台主要是管理员管理
1会员管理 --对于前台用户的注册信息进行管理,可以进行禁言或者封号的操作
2考研资讯 --对于考研的资讯信息进行管理,包括添加,删除,修改,查询等基本操作
3友情链接 --对于考研的链接信息进行管理,包括添加,删除,修改,查询等基本操作
4板块管理 --可以对于大板块以及板块下边的分类信息进行增加,修改,删除的擦欧总
5帖子管理 --对于前台用户发布的帖子进行管理,包括设置回帖,迁移,精华,置顶等操作
6版主审核 --对于用户申请的版主信息进行审核,可以进行通过或者拒绝的操作。
7意见建议 --对于用户的留言信息进行查看以及回复。
8敏感字符 --设置敏感字符,对于用户发布的文章的评论信息包括敏感字符的进行隐藏。
9举报信息 --查看用户的举报信息并进行处理
三、下载链接
更多关于项目的描述可以点击基于SSM+JSP的考研论坛系统
四、核心代码
首页的controller代码
package com.controller;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.*;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartUtilities;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.data.category.DefaultCategoryDataset;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.bean.Banzhu;
import com.bean.Bbstype;
import com.bean.Member;
import com.bean.News;
import com.bean.Tzhtinfo;
import com.bean.Tzinfo;
import com.bean.User;
import com.bean.Yqlink;
import com.dao.BanzhuDAO;
import com.dao.BbstypeDAO;
import com.dao.MemberDAO;
import com.dao.NewsDAO;
import com.dao.TzhtinfoDAO;
import com.dao.TzinfoDAO;
import com.dao.UserDAO;
import com.dao.YqlinkDAO;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.util.Info;
import java.util.*;
@Controller
public class IndexController extends BaseController {
@Resource
MemberDAO memberDAO;
@Resource
BbstypeDAO bbstypeDAO;
@Resource
NewsDAO newsDAO;
@Resource
YqlinkDAO yqlinkDAO;
@Resource
TzinfoDAO tzinfoDAO;
@Resource
BanzhuDAO banzhuDAO;
@Resource
TzhtinfoDAO tzhtinfoDAO;
//首页
@RequestMapping("index")
public String index(HttpServletRequest request){
List<Yqlink> yqlinklist = yqlinkDAO.selectAll();
List<Bbstype> typelist = bbstypeDAO.selectAll();
//今日话题
List<Tzinfo> nowtzinfolist = tzinfoDAO.selectNowtzinfo(Info.getDateStr().substring(0,10));
List<News> newslist = newsDAO.selectAll();
for(Bbstype bbstype:typelist){
//子类
List<Bbstype> childlist = bbstypeDAO.selectChildtype(bbstype.getId());
bbstype.setChildlist(childlist);
//分类贴子
List<Tzinfo> ftypetzinfolist = tzinfoDAO.selectTypetzinfo(bbstype.getId());
bbstype.setFtypetzinfolist(ftypetzinfolist);
//版主
Banzhu banzhu;
List<Banzhu> banzhulist = banzhuDAO.selectOne(bbstype.getId());
if(banzhulist.size()!=0){
banzhu = banzhulist.get(0);
Member member = memberDAO.findById(banzhu.getMemberid());
bbstype.setBanzhu(member);
}
}
request.setAttribute("nowtzinfolist", nowtzinfolist);
request.setAttribute("yqlinklist", yqlinklist);
request.setAttribute("typelist", typelist);
request.setAttribute("newslist", newslist);
return "index";
}
//搜索
@RequestMapping("search")
public String search(HttpServletRequest request){
String key = request.getParameter("q");
System.out.println("关键字"+key);
List<Yqlink> yqlinklist = yqlinkDAO.selectAll();
List<Bbstype> typelist = bbstypeDAO.selectAll();
//今日话题
List<Tzinfo> nowtzinfolist = tzinfoDAO.selectNowtzinfo(Info.getDateStr().substring(0,10));
List<News> newslist = newsDAO.selectAll();
for(Bbstype bbstype:typelist){
//子类
List<Bbstype> childlist = bbstypeDAO.selectChildtype(bbstype.getId());
bbstype.setChildlist(childlist);
//分类贴子
List<Tzinfo> ftypetzinfolist = tzinfoDAO.selectTypetzinfo(bbstype.getId());
bbstype.setFtypetzinfolist(ftypetzinfolist);
//版主
Banzhu banzhu;
List<Banzhu> banzhulist = banzhuDAO.selectOne(bbstype.getId());
if(banzhulist.size()!=0){
banzhu = banzhulist.get(0);
Member member = memberDAO.findById(banzhu.getMemberid());
bbstype.setBanzhu(member);
}
}
request.setAttribute("nowtzinfolist", nowtzinfolist);
request.setAttribute("yqlinklist", yqlinklist);
request.setAttribute("typelist", typelist);
request.setAttribute("newslist", newslist);
String index = request.getParameter("index");
int pageindex = 1;
if(index!=null){
pageindex = Integer.parseInt(index);
}
Page<Object> page = PageHelper.startPage(pageindex,6);
System.out.println("key===="+key);
List<Tzinfo> list = tzinfoDAO.searchQ(key);
//System.out.println("list===="+list.size());
for(Tzinfo tzinfo:list){
Member author = memberDAO.findById(tzinfo.getAuthor());
Bbstype ftype = bbstypeDAO.findById(tzinfo.getFid());
Bbstype stype = bbstypeDAO.findById(tzinfo.getSid());
List<Tzhtinfo> allhtlist = tzhtinfoDAO.selectHtinfo(tzinfo.getId());
tzinfo.setAllhtlist(allhtlist);
tzinfo.setStype(stype);
tzinfo.setFtype(ftype);
tzinfo.setMember(author);
}
request.setAttribute("list", list);
request.setAttribute("key", key);
request.setAttribute("index", page.getPageNum());
request.setAttribute("pages", page.getPages());
request.setAttribute("total", page.getTotal());
return "search";
}
}
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for banzhu
-- ----------------------------
DROP TABLE IF EXISTS `banzhu`;
CREATE TABLE `banzhu` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`memberid` int(11) DEFAULT NULL,
`fid` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of banzhu
-- ----------------------------
INSERT INTO `banzhu` VALUES ('6', '41', '37');
INSERT INTO `banzhu` VALUES ('7', '45', '46');
-- ----------------------------
-- Table structure for bbstype
-- ----------------------------
DROP TABLE IF EXISTS `bbstype`;
CREATE TABLE `bbstype` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`typename` varchar(255) DEFAULT NULL,
`fatherid` varchar(255) DEFAULT NULL,
`delstatus` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of bbstype
-- ----------------------------
INSERT INTO `bbstype` VALUES ('37', '考研报名', '0', '0');
INSERT INTO `bbstype` VALUES ('38', '如何报名', '37', '0');
INSERT INTO `bbstype` VALUES ('39', '报名缴费', '37', '0');
INSERT INTO `bbstype` VALUES ('40', '报名注意事项', '37', '0');
INSERT INTO `bbstype` VALUES ('41', '考研学习', '0', '0');
INSERT INTO `bbstype` VALUES ('42', '考研学习网站', '41', '0');
INSERT INTO `bbstype` VALUES ('43', '考研学习网站1', '41', '0');
INSERT INTO `bbstype` VALUES ('44', '考研学习网站2', '41', '0');
INSERT INTO `bbstype` VALUES ('45', '考研记忆', '0', '0');
INSERT INTO `bbstype` VALUES ('46', '考研心得', '0', '0');
INSERT INTO `bbstype` VALUES ('47', '考研趣事', '45', '0');
INSERT INTO `bbstype` VALUES ('48', '考研付出', '45', '0');
INSERT INTO `bbstype` VALUES ('49', '考研心酸', '45', '0');
INSERT INTO `bbstype` VALUES ('50', '备考方法', '46', '0');
INSERT INTO `bbstype` VALUES ('51', '学习方法', '46', '0');
-- ----------------------------
-- Table structure for bzapplyrecord
-- ----------------------------
DROP TABLE IF EXISTS `bzapplyrecord`;
CREATE TABLE `bzapplyrecord` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`fid` int(255) DEFAULT NULL,
`note` text,
`memberid` int(255) DEFAULT NULL,
`shstatus` varchar(255) DEFAULT NULL,
`savetime` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of bzapplyrecord
-- ----------------------------
INSERT INTO `bzapplyrecord` VALUES ('4', '37', '我有资格当这个版主', '41', '通过', '2022-01-19 13:52:02');
INSERT INTO `bzapplyrecord` VALUES ('5', '41', '我有资格当这个版主', '41', '通过', '2022-01-19 17:47:06');
INSERT INTO `bzapplyrecord` VALUES ('6', '45', '我有资格当这个版主', '41', '待审核', '2022-01-19 21:53:46');
INSERT INTO `bzapplyrecord` VALUES ('7', '46', '我有资格当这个版主', '44', '拒绝', '2022-01-19 11:31:46');
INSERT INTO `bzapplyrecord` VALUES ('8', '46', '我有资格当这个版主', '45', '通过', '2022-01-19 17:00:06');
-- ----------------------------
-- Table structure for chat
-- ----------------------------
DROP TABLE IF EXISTS `chat`;
CREATE TABLE `chat` (
`id` int(20) NOT NULL AUTO_INCREMENT,
`msg` text,
`hfmsg` text,
`savetime` varchar(255) DEFAULT NULL,
`memberid` int(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of chat
-- ----------------------------
INSERT INTO `chat` VALUES ('6', '有人发不好的东西在上面', '好,我知道了', '2022-01-19 14:00:36', '35');
INSERT INTO `chat` VALUES ('7', '请管理员再加一个板块', '知道了', '2022-01-19 11:20:25', '43');
INSERT INTO `chat` VALUES ('8', '请管理员管理评价内容', '收到', '2022-01-19 11:32:33', '44');
INSERT INTO `chat` VALUES ('9', '666', '', '2022-01-19 20:34:19', '45');
INSERT INTO `chat` VALUES ('10', '管理好', '', '2022-01-19 21:43:46', '46');
INSERT INTO `chat` VALUES ('11', '我建议新建一个板块', '', '2022-01-16 18:00:07', '47');
-- ----------------------------
-- Table structure for fans
-- ----------------------------
DROP TABLE IF EXISTS `fans`;
CREATE TABLE `fans` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`memberid` int(11) DEFAULT NULL,
`gzmemberid` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of fans
-- ----------------------------
INSERT INTO `fans` VALUES ('1', '41', '35');
INSERT INTO `fans` VALUES ('2', '43', '35');
INSERT INTO `fans` VALUES ('3', '44', '35');
INSERT INTO `fans` VALUES ('4', '45', '41');
-- ----------------------------
-- Table structure for jbrecord
-- ----------------------------
DROP TABLE IF EXISTS `jbrecord`;
CREATE TABLE `jbrecord` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`memberid` int(255) DEFAULT NULL,
`jbmemberid` int(255) DEFAULT NULL,
`note` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of jbrecord
-- ----------------------------
-- ----------------------------
-- Table structure for member
-- ----------------------------
DROP TABLE IF EXISTS `member`;
CREATE TABLE `member` (
`id` int(20) NOT NULL AUTO_INCREMENT,
`uname` varchar(255) DEFAULT NULL,
`upass` varchar(255) DEFAULT NULL,
`email` varchar(255) DEFAULT NULL,
`tname` varchar(255) DEFAULT NULL,
`sex` varchar(255) DEFAULT NULL,
`addr` varchar(255) DEFAULT NULL,
`qq` varchar(255) DEFAULT NULL,
`tel` varchar(255) DEFAULT NULL,
`delstatus` varchar(255) DEFAULT NULL,
`savetime` varchar(255) DEFAULT NULL,
`isjy` varchar(255) DEFAULT NULL,
`filename` varchar(255) DEFAULT NULL,
`isfh` varchar(255) DEFAULT NULL,
`shstatus` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=48 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of member
-- ----------------------------
INSERT INTO `member` VALUES ('35', 'jack', '123456', 'songxiaomei@126.com', '孙小梅', '女', '湖北武汉金地中心城', '4398249082', '13854898541', '0', '2022-01-19 11:20:34', 'no', '1539828998553.jpg', 'no', '通过审核');
INSERT INTO `member` VALUES ('36', 'calvin', '123456', 'calvin@126.com', 'calvin', '男', '湖北武汉关谷一路', '4839028402', '13894389431', '0', '2022-01-19 11:10:14', 'no', '1539871764306.jpg', 'no', '通过审核');
INSERT INTO `member` VALUES ('37', 'Tom', '123456', 'tom@126.com', '汤姆', '男', '北京市昌平区', '480384028', '13904830431', '0', '2022-01-19 11:21:45', 'no', '1539937260073.jpg', 'no', '通过审核');
INSERT INTO `member` VALUES ('38', 'zhangsan', '123456', 'zhangsan@126.com', '张三', '男', '湖北武汉', '43248929', '13937462611', '0', '2022-01-19 11:37:49', 'no', '1540053443906.jpg', 'no', '通过审核');
INSERT INTO `member` VALUES ('41', 'ssh', '123456', 'ssh@126.com', '达达', '男', '河南省郑州市高新区郑州大学1', '3890283092', '13943784731', '0', '2022-01-19 13:46:15', 'no', '1588480473077.gif', 'no', '通过审核');
INSERT INTO `member` VALUES ('42', 'zhangheng', '123456', '923688521@qq.com', '张恒', '男', '河南省登封市', '923688521', '15236987412', '0', '2022-01-19 20:00:42', 'no', '1588507206140.png', 'no', '通过审核');
INSERT INTO `member` VALUES ('43', 'dada', '123456', '923766083@qq.com', '哒哒', '男', '河南省', '923766083', '18236764199', '0', '2022-01-19 11:17:02', 'no', '1588562187251.jpg', 'no', '通过审核');
INSERT INTO `member` VALUES ('44', 'chengxuyuan', '123456', '923766083@qq.com', '程序员', '男', '河南省登封市', '923766083', '15236987412', '0', '2022-01-19 11:29:17', 'no', '1588562922344.jpg', 'no', '通过审核');
INSERT INTO `member` VALUES ('45', 'suwei', '123456', '923766083@qq.com', '苏伟', '男', '河南省登封市', '923766083', '15236987412', '0', '2022-01-19 10:53:23', 'no', '1605577198130.png', 'no', '通过审核');
INSERT INTO `member` VALUES ('46', 'TEST', '123456', '1292403436@qq.com', '哒哒', '男', '河南省登封市', '923766083', '18236547412', '0', '2022-01-19 21:39:40', 'no', '1615815567147.jpg', 'no', '通过审核');
INSERT INTO `member` VALUES ('47', 'test123', '123456', '2949019614@qq.com', 'test', '男', '河南省登封市唐庄镇张村', '12929655874', '13569557185', '0', '2022-01-16 17:57:14', 'no', '1642327009434.gif', 'no', '通过审核');