项目源码免费下载:SSM实现个人博客
有问题请循环vx:kht808

3.相关包与实体类的创建

		1.包名与路径如下:

2.实体类的编写
Blog类

public class Blog implements Serializable {

    /**
*
*/
private static final long serialVersionUID = 1L; private Integer id; // 编号
private String title; // 博客标题
private String summary; // 摘要
private Date releaseDate; // 发布日期
private Integer clickHit; // 查看次数
private Integer replyHit; // 回复次数
private String content; // 博客内容
private String contentNoTag; // 博客内容 无网页标签 Lucene分词用
private BlogType blogType; // 博客类型 private Integer blogCount; // 博客数量 非博客实际属性,主要是 根据发布日期归档查询博客数量用
private String releaseDateStr; // 发布日期字符串 只取年和月
private String keyWord; // 关键字 空格隔开 private List<String> imagesList=new LinkedList<>(); // 博客里存在的图片 主要用于列表展示显示缩略图 public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getSummary() {
return summary;
}
public void setSummary(String summary) {
this.summary = summary;
}
public Date getReleaseDate() {
return releaseDate;
}
public void setReleaseDate(Date releaseDate) {
this.releaseDate = releaseDate;
}
public Integer getClickHit() {
return clickHit;
}
public void setClickHit(Integer clickHit) {
this.clickHit = clickHit;
}
public Integer getReplyHit() {
return replyHit;
}
public void setReplyHit(Integer replyHit) {
this.replyHit = replyHit;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getContentNoTag() {
return contentNoTag;
}
public void setContentNoTag(String contentNoTag) {
this.contentNoTag = contentNoTag;
}
public BlogType getBlogType() {
return blogType;
}
public void setBlogType(BlogType blogType) {
this.blogType = blogType;
}
public Integer getBlogCount() {
return blogCount;
}
public void setBlogCount(Integer blogCount) {
this.blogCount = blogCount;
}
public String getReleaseDateStr() {
return releaseDateStr;
}
public void setReleaseDateStr(String releaseDateStr) {
this.releaseDateStr = releaseDateStr;
}
public String getKeyWord() {
return keyWord;
}
public void setKeyWord(String keyWord) {
this.keyWord = keyWord;
} public List<String> getImagesList() {
return imagesList;
}
public void setImagesList(List<String> imagesList) {
this.imagesList = imagesList;
} }

Blogger类

public class Blogger {
private Integer id;
@NotNull(message = "用户名不能为空")
@Length(message = "用户名长度必须{min}-{max}在之间", max = 20, min = 2)
private String name;
@NotNull(message = "密码不能为空")
@Size(min = 6, message = "密码长度不能小于{min}")
private String password;
private Text profile; //博客内容
private String nickName; //昵称
private String sign; //个性签名
private String imageName; //照片名称
@Email(message = "邮箱格式不对")
private String email; //邮箱
@Pattern(regexp = "^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$", message = "手机号码不正确")
private String phone; //号码 public Blogger() {
} public Blogger(Integer id, String name, String password, Text profile, String nickName, String sign, String imageName, String email, String phone) {
this.id = id;
this.name = name;
this.password = password;
this.profile = profile;
this.nickName = nickName;
this.sign = sign;
this.imageName = imageName;
this.email = email;
this.phone = phone;
} public Integer getId() {
return id;
} public void setId(Integer id) {
this.id = id;
} public String getName() {
return name;
} public void setName(String name) {
this.name = name;
} public String getPassword() {
return password;
} public void setPassword(String password) {
this.password = password;
} public Text getProfile() {
return profile;
} public void setProfile(Text profile) {
this.profile = profile;
} public String getNickName() {
return nickName;
} public void setNickName(String nickName) {
this.nickName = nickName;
} public String getSign() {
return sign;
} public void setSign(String sign) {
this.sign = sign;
} public String getImageName() {
return imageName;
} public void setImageName(String imageName) {
this.imageName = imageName;
} public String getEmail() {
return email;
} public void setEmail(String email) {
this.email = email;
} public String getPhone() {
return phone;
} public void setPhone(String phone) {
this.phone = phone;
} @Override
public String toString() {
return "Blogger{" +
"id=" + id +
", name='" + name + '\'' +
", password='" + password + '\'' +
", profile=" + profile +
", nickName='" + nickName + '\'' +
", sign='" + sign + '\'' +
", imageName='" + imageName + '\'' +
", email='" + email + '\'' +
", phone='" + phone + '\'' +
'}';
}
}

BlogType类

public class BlogType {
private Integer id;
private String typeName;
private String orderNo;
private Integer blogCount; public Integer getBlogCount() {
return blogCount;
} public void setBlogCount(Integer blogCount) {
this.blogCount = blogCount;
} public BlogType(Integer id, String typeName, String orderNo) {
this.id = id;
this.typeName = typeName;
this.orderNo = orderNo;
} public BlogType() {
} public Integer getId() {
return id;
} public void setId(Integer id) {
this.id = id;
} public String getTypeName() {
return typeName;
} public void setTypeName(String typeName) {
this.typeName = typeName;
} public String getOrderNo() {
return orderNo;
} public void setOrderNo(String orderNo) {
this.orderNo = orderNo;
} @Override
public String toString() {
return "BlogType{" +
"id=" + id +
", typeName='" + typeName + '\'' +
", orderNo='" + orderNo + '\'' +
'}';
}
}

Comment类

public class Comment {

    private Integer id; // 编号
private String userIp; // 用户IP
private String content; // 评论内容
private Blog blog; // 被评论的博客
private Date commentDate; // 评论日期
private Integer state; // 审核状态 0 待审核 1 审核通过 2 审核未通过 public Comment() {
} public Comment(Integer id, String userIp, String content, Blog blog, Date commentDate, Integer state) {
this.id = id;
this.userIp = userIp;
this.content = content;
this.blog = blog;
this.commentDate = commentDate;
this.state = state;
} public Integer getId() {
return id;
} public void setId(Integer id) {
this.id = id;
} public String getUserIp() {
return userIp;
} public void setUserIp(String userIp) {
this.userIp = userIp;
} public String getContent() {
return content;
} public void setContent(String content) {
this.content = content;
} public Blog getBlog() {
return blog;
} public void setBlog(Blog blog) {
this.blog = blog;
} public Date getCommentDate() {
return commentDate;
} public void setCommentDate(Date commentDate) {
this.commentDate = commentDate;
} public Integer getState() {
return state;
} public void setState(Integer state) {
this.state = state;
} @Override
public String toString() {
return "Comment{" +
"id=" + id +
", userIp='" + userIp + '\'' +
", content='" + content + '\'' +
", blog=" + blog +
", commentDate=" + commentDate +
", state=" + state +
'}';
}
}

link类

public class Link {
private Integer id;
private String linkName;
private String linkUrl;
private Integer orderNo; public Link() {
} public Link(Integer id, String linkName, String likUrl, Integer orderNo) {
this.id = id;
this.linkName = linkName;
this.linkUrl = likUrl;
this.orderNo = orderNo;
} public Integer getId() {
return id;
} public void setId(Integer id) {
this.id = id;
} public String getLinkName() {
return linkName;
} public void setLinkName(String linkName) {
this.linkName = linkName;
} public String getLinkUrl() {
return linkUrl;
} public void setLinkUrl(String linkUrl) {
this.linkUrl = linkUrl;
} public Integer getOrderNo() {
return orderNo;
} public void setOrderNo(Integer orderNo) {
this.orderNo = orderNo;
} @Override
public String toString() {
return "Link{" +
"id=" + id +
", linkName='" + linkName + '\'' +
", likUrl='" + linkUrl + '\'' +
", orderNo=" + orderNo +
'}';
}
}

pageBean类

public class PageBean {
private int page; // 第几页
private int pageSize; // 每页记录数
private int start; // 起始页 public PageBean() {
} public PageBean(int page, int pageSize, int start) {
this.page = page;
this.pageSize = pageSize;
this.start = start;
} public PageBean(int page, int pageSize) {
super();
this.page = page;
this.pageSize = pageSize;
} public int getPage() {
return page;
}
public void setPage(int page) {
this.page = page;
} public int getPageSize() {
return pageSize;
} public void setPageSize(int pageSize) {
this.pageSize = pageSize;
} public int getStart() {
return (page-1)*pageSize;
} @Override
public String toString() {
return "PageBean{" +
"page=" + page +
", pageSize=" + pageSize +
", start=" + start +
'}';
} }

SSM实现个人博客-day03的更多相关文章

  1. SSM实现个人博客-day04

    项目源码免费下载:SSM实现个人博客 有问题询问vx:kht808 3.项目搭建(SSM整合) (1)创建maven工程,导入相应的依赖 <properties> <project. ...

  2. SSM实现个人博客-day02

    2.数据库设计 项目源码:SSM实现个人博客 有问题请询问vx:kht808

  3. SSM实现个人博客-day01

    1.需求分析 项目源码免费下载:SSM实现个人博客 有问题请询问vx:kht808

  4. Java基于SSM的个人博客系统(源码 包含前后台)

    @ 目录 系统简介 系统运行截图 核心代码 写在最后 系统简介 技术点:Java.JSP.SSM框架,实现了个人博客系统 用户角色分为:普通用户.管理员.系统管理员 功能:发博客.博客分类.博客删除. ...

  5. SSM博客登录注册

    我的博客采用的是 spring+springmvc+mybatis框架,用maven和git管理项目,之后的其他功能还有待进一步的学习. 首先新建一个maven项目,我的项目组成大概就这样, 建立好项 ...

  6. SSM博客

    最近在写基于SSM 的博客,用的是spring+springmvc+mybatis搭建的,用的maven+github管理项目,目前完成了登录注册以及用户管理员的增删改查,后续的功能还需要完善,如何建 ...

  7. 关于利用maven搭建ssm的博客,我们一起来探讨下问的最多的问题

    前言 开心一刻 有个同学去非洲援建,刚到工地接待他的施工员是个黑人,他就用英语跟人家交流,黑人没做声. 然后他又用法语,黑人还是没说话. 然后他用手去比划.黑人终于开口了:瞎比划嘎哈,整个工地都中国人 ...

  8. SSM(Spring+Spring MVC+Mybatis)开发前台后功能完整的java开源博客管理系统

    项目描述 本项目通过SSM(SpringMVC+Mybatis+Spring)框架编写的一个人博客管理系统,使用hexo主题,以及MAVEN进行对项目管理,并且前端具有粒子和点击爱心效果.后端的页面框 ...

  9. CleanBlog(个人博客+源码)

    CleanBlog是一个高端(低调).大气(简洁)的个人博客系统,之前在网上看到了好多个人博客网站,感觉很酷的,自己也想搭建一个,最近 刚学完SSM(Spring/SpringMVC/MyBatis) ...

随机推荐

  1. django主要文件介绍及django请求生命流程图

    -mysite文件夹 --mysite文件夹 --setting.py 配置文件 --urls.py 路由和视图函数对应关系(路由层) --wsgi.py wsgiref模块 --manage.py ...

  2. python关于openpyxl库的常用使用介绍

    from openpyxl import load_workbook #只能加载已存在的表格 wb=load_workbook("D:\zhijing_work\测试数据\测试文件\yeta ...

  3. MySQL二进制binlog日志说明以及利用binlog日志恢复数据

    MySQL的binlog日志对于mysql数据库来说是十分重要的.在数据丢失的紧急情况下,我们往往会想到用binlog日志功能进行数据恢复(定时全量备份+binlog日志恢复增量数据部分). 一.关于 ...

  4. python域名200检测

    import requests import threading import queue # qianxiao996精心制作 #博客地址:https://blog.csdn.net/qq_36374 ...

  5. .Net Core 实现账户充值,还款,用户登录(WebApi的安全)

    个人未开通网站: http://justin1107.pc.evyundata.cn/vip_justin1107.html Api using System; using System.Collec ...

  6. 在idea中新建完springboot项目的时候遇到问题(右键没有class选择;控制台报错:Could not transfer artifact org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.60 from/to central ....)

    一.在idea中新建完springboot项目的时候遇到问题 问题1:右键没有class选择 解决:之所以会如此,是因为项目还没完成创建完成,解决:只需等等即可,等到完全创建完成即可 问题2(报tom ...

  7. JavaScript01 js基础语法,数据类型

    JavaScript的概述: 1.组成 三部分组成 ecmaScript 基础语法 (es5) dom document object model 文档对象模型 (操作html文档内容) bom bo ...

  8. 羽夏笔记——Hook攻防基础

    写在前面   本笔记是由本人独自整理出来的,图片来源于网络.本人非计算机专业,可能对本教程涉及的事物没有了解的足够深入,如有错误,欢迎批评指正. 如有好的建议,欢迎反馈.码字不易,如果本篇文章有帮助你 ...

  9. 面试问题之操作系统:linux线程API

    https://blog.csdn.net/youwotianya/article/details/80933449

  10. HTML 5的页面结构和HTML 4或早先的HTML有什么不同?

    一个典型的Web页面有页眉(header),页脚(footer),导航(navigation),正文(central area)和侧栏(side bar).现在如果是在HTML 4中,HTML部分中的 ...