- 专业类别表
- 专业表
- 专业详情表
- 视频表
- 评论表
- 评论点赞表
- 视频点赞表
- 视频需求表
- 日志表
- 配置表
- 用户表
- 网站留言表
- 专业问题表
- 问题回答表
- 黑名单表
thymeleaf+bootstrap+jquery+layer
springboot+mybatis-plus
- 创建数据库表
- 创建项目,引入相关依赖
- 使用mybatis-plus generator自动创建代码
- 自定义错误页面
- 爬取相关网站数据,使用python进行数据处理
- 数据入库,并修改数据库原始数据
-
编写html页面,使用bootstrap模板进行页面框架搭建
-
提取公共head、公共foot、公共网页导航,方便其他页面进行复用
<!DOCTYPE html> <html lang="en" xmlns:th="http://www.thymeleaf.org"> <head th:fragment="common-header(title, link)"> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <link rel="icon" href="/img/favicon.ico"> <title th:replace="${title}">demo-project</title> <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"> <link th:href="@{/css/ie10-viewport-bug-workaround.css}" rel="stylesheet"> <link rel="stylesheet" th:href="@{/css/header.css}"> <th:block th:replace="${link}"/> <link rel="stylesheet" th:href="@{/css/common.css}"> </head> <body> <!-- 类似指定id为header,复用方法:<div th:replace="commons/header :: header"></div>--> <nav class="navbar navbar-fixed-top navbar-inverse nav_color" th:fragment="header"> <div class="container content_container"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" th:href="@{/}" th:text="${conf.webName}">Subject Show</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a th:href="@{/}" th:text="${conf.headSubject}">专业类别</a></li> <li><a th:href="@{'/majors/1'(page=1, size=8)}" th:text="${conf.headMajor}">专业</a></li> <li><a th:href="@{/top}" th:text="${conf.headTop}">视频贡献排行榜</a></li> <li><a th:href="@{/about}" th:text="${conf.headAbout}">关于我</a></li> <li><a th:href="@{/contact}" th:text="${conf.headContact}">联系我</a></li> <li><a th:href="@{/contribute}" th:text="${conf.headContribute}">我要投稿</a></li> </ul> </div> </div> </nav> </body> </html>
<!DOCTYPE html> <html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"> <head th:replace="commons/header :: common-header(~{}, ~{::link})"> <link rel="stylesheet" th:href="@{/css/footer.css}"> </head> <div class="foot_div" th:fragment="footer(script)"> <script th:src="@{/js/jquery.min.js}"></script> <script th:src="@{/js/bootstrap.min.js}"></script> <!-- <script th:src="@{/js/common.js}"></script>--> <script th:src="@{/layer/layer.js}"></script> <th:block th:replace="${script}"/> <hr> <p th:text="${conf.footer}">© 2016 Company, Inc.</p> </div> </html>
-
-
专业类别页面数据回显及排版
- 切面获取资源请求,异步保存到日志表,同时提供并发请求量监控
-
新增视图
vw_video_up(展示所有video的up主)
vw_authed_up(展示所有已授权的up主)
-
页面自适应支持(使得在手机上也能正常显示)
-
添加专业页面、提供专业搜索功能
- 添加专业详情页面
- 页面顶部提供当前专业种类下该专业附近的几个专业
- 页面排版
- 在index页面添加搜索功能
- 添加专业详情表
- 修改video表结构(将封面和up头像本地化)
- 增加封面名字段和头像名字段,直接从static/img目录下获取图片信息
-
进行WebMvcConfigurer配置,增加静态资源目录(磁盘中指定的目录)
@Override public void addResourceHandlers(ResourceHandlerRegistry registry) { log.info("添加静态封面资源路径:{}", coverPath); log.info("添加静态头像资源路径:{}", facePath); registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/"); //访问路径:http://localhost:8081/cover/1c8e2b974c543582117948b670375434d8001abd.jpg //addResourceHandler填:/cover/**,addResourceLocations填本地路径:file:E:/workspace/java/cover/ registry.addResourceHandler("/cover/**").addResourceLocations(coverPath); registry.addResourceHandler("/face/**").addResourceLocations(facePath); }
-
修改详情页布局
- 将视频时长放至封面右下角
- 增加详情翻页
- 增加多余段落进行折叠功能
- 爬取专业详情数据(文字)并分析入库
- 增加后台管理页面
- 编写登录界面
- 编写拦截器,进行身份验证
- 调整专业详情页面布局
- 增加视频点赞、踩、点击量统计功能
-
调整专业页面布局
-
增加视频需求提交功能(想看某个专业的视频,但是没有,可以提交需求)
- 增加评论功能
- 添加评论表
- 增加评论点赞表
- 增加视频投稿功能
- 修改关于、联系我、视频贡献排行榜页面并完善其功能
- 添加后台管理相关功能并完善
- 增加网站的可配置性
- 增加联系界面的留言功能
- 增加message表(留言表),修改user表结构
- 根据ip获取所在城市方法设置超时时间,避免因超时导致长时间阻塞
- 添加后台查看留言面板
- 增加专业介绍、课程、就业方向可编辑功能
- 增加configuration表字段
- 专业介绍、课程、就业方向可编辑功能实现
- 后台代码bug修复
-
select回显
将下拉框的值设置为要选中的值即可:
$("#subjectId").val(data.subjectId)
-
- 专业详情界面的编辑功能
- 增加详情修改表:detail_update
- 等待网站备案后再完成剩余功能
- 网站备案成功,配置https
- 测试修改专业描述、课程、就业信息
- 修改user表,增加ip字段
- 增加xss防御
- 增加异常访问检测机制(未完成)
- 使用flink流处理进行检测:读取nginx-log进行处理
- 自定义source
- 数据去重
- 完成异常ip检测功能
- 增加ip黑名单表
- 增加知乎相关提问模块
- 增加major_question、question_answer表
- 增加知乎评论
- 增加major_question与question_answer表
- 修改页面css样式
- 修改footer
- 加入redis缓存
- 爬取文章数据,增加文章展示模块
- 调整页面显示布局
将页面分为左右两部分,visible-lg保证只有在大屏显示器才显示,col-lg-3表示右侧宽度占1/4
<div class="row row-offcanvas row-offcanvas-right">
<!-- 左侧 -->
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-9"></div>
<!-- 右侧 -->
<div class="col-lg-3 sidebar-offcanvas visible-lg"></div>
</div>
<!-- 表示当显示器宽度大于1200px时,.container的宽度为90%,margin-left为10% -->
<!-- 可以修改min-width来调整不同显示器大小时内容的显示范围 -->
@media (min-width: 1200px) {
.container {
width: 90%;
margin-left:10%
}
}
<!-- 动态更改html的header -->
<script th:inline="javascript">
document.getElementsByTagName('title')[0].innerText = [[${title}]];
</script>
<!-- 直接显示带标签的数据 -->
th:utext="${article.content}"
修改input的非空提示:
oninvalid="setCustomValidity('不能什么也不填哦');"