SSM实现个人博客-day03
项目源码免费下载: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的更多相关文章
- SSM实现个人博客-day04
项目源码免费下载:SSM实现个人博客 有问题询问vx:kht808 3.项目搭建(SSM整合) (1)创建maven工程,导入相应的依赖 <properties> <project. ...
- SSM实现个人博客-day02
2.数据库设计 项目源码:SSM实现个人博客 有问题请询问vx:kht808
- SSM实现个人博客-day01
1.需求分析 项目源码免费下载:SSM实现个人博客 有问题请询问vx:kht808
- Java基于SSM的个人博客系统(源码 包含前后台)
@ 目录 系统简介 系统运行截图 核心代码 写在最后 系统简介 技术点:Java.JSP.SSM框架,实现了个人博客系统 用户角色分为:普通用户.管理员.系统管理员 功能:发博客.博客分类.博客删除. ...
- SSM博客登录注册
我的博客采用的是 spring+springmvc+mybatis框架,用maven和git管理项目,之后的其他功能还有待进一步的学习. 首先新建一个maven项目,我的项目组成大概就这样, 建立好项 ...
- SSM博客
最近在写基于SSM 的博客,用的是spring+springmvc+mybatis搭建的,用的maven+github管理项目,目前完成了登录注册以及用户管理员的增删改查,后续的功能还需要完善,如何建 ...
- 关于利用maven搭建ssm的博客,我们一起来探讨下问的最多的问题
前言 开心一刻 有个同学去非洲援建,刚到工地接待他的施工员是个黑人,他就用英语跟人家交流,黑人没做声. 然后他又用法语,黑人还是没说话. 然后他用手去比划.黑人终于开口了:瞎比划嘎哈,整个工地都中国人 ...
- SSM(Spring+Spring MVC+Mybatis)开发前台后功能完整的java开源博客管理系统
项目描述 本项目通过SSM(SpringMVC+Mybatis+Spring)框架编写的一个人博客管理系统,使用hexo主题,以及MAVEN进行对项目管理,并且前端具有粒子和点击爱心效果.后端的页面框 ...
- CleanBlog(个人博客+源码)
CleanBlog是一个高端(低调).大气(简洁)的个人博客系统,之前在网上看到了好多个人博客网站,感觉很酷的,自己也想搭建一个,最近 刚学完SSM(Spring/SpringMVC/MyBatis) ...
随机推荐
- 安装MYSQL8.0提示api-ms-win-crt-runtime-l1-1-0.dll 丢失
Windows Server 2012 api-ms-win-crt-runtime-l1-1-0.dll 丢失 2017-11-06 11:11:37 Martin_Yelvin 阅读数 17015 ...
- 《shader入门精要》13.2再谈运动模糊中片元着色器的世界坐标的计算
具体在书p275页 这里为啥需要除D.w呢. 首先我们得到的NDC的坐标是已经归一化的,但是CurrenViewProjectionMatrix的作用,是把世界空间转化为尚未归一化的裁剪空间. 这里看 ...
- NET经典书籍必读
C#与.NET框架,入门 + 进阶 + 精通,外加并发编程实例,10本C#图书,一本都不能少. 1.<Learning hard C#学习笔记> 作者:李志 书号:978-7-115-3 ...
- 权限命令 vi编辑器 命令模式 使用技巧
一.长格式由七部分组成 权限 引用数字 所有者 所属组 文件大小 时间 名称 如 dr-xr-xr-x 5 root root 409 ...
- Django 之 modelForm (edit.html页面的编写)
models.py文件 from django.db import models # Create your models here. from django.db import models # C ...
- GeneralUpdate20220323里程碑版本发布
大家好我是juster,GeneralUpdate的开源项目作者.这次将发布GeneralUpdate里程碑版本,该版本发生了巨大改变历时4个月的时间终于要和大家见面了.开源不易希望大家能多多支持.可 ...
- Flutter入门教程(一)Flutter简介
这是Flutter系列第一篇文章,后续会持续更新Flutter相关知识,本篇就主要对于Flutter技术做一个简单的入门介绍 一.Flutter简介 Flutter是谷歌的移动UI框架,可以快速在iO ...
- 使用过滤器获取系统目录或文件名(java.io)
import java.io.File;import java.io.FilenameFilter; File[] file = new File("D:\\"); //使用Fil ...
- Linux Centos7使用ping命令ping不通网络的解决方案
本解决方案不配置dns,都是ping的IP地址,所以如果想ping域名,则加上DNS项的配置后自行尝试吧 我使用的虚拟机系统信息: Linux:Centos7 Network:虚拟机设置的桥接模式(自 ...
- Redisson 加锁原理
一.分布式加锁过程 RLock lock = redissonClient.getLock(REDISSON_DISTRIBUTE_KEY); lock.lock(); wireshark抓包可以看见 ...