系统简介
技术点:Java、JSP、SSM框架,实现了个人博客系统
用户角色分为:普通用户、管理员、系统管理员
功能:发博客、博客分类、博客删除、评论、博客管理、日志等
看完本博客,你可以得到:
1> 学会SSM框架,相当于一个学习例子,可以自己拿来改
2> 拥有自己的私人博客系统
系统运行截图
登录界面:
博客首页:
博客列表:
核心代码
一、业务逻辑层:
博客用户逻辑类:
Blogger
/* 1: */ package com.blog.service.impl; /* 2: */ /* 3: */ import com.blog.dao.BloggerDao; /* 4: */ import com.blog.entity.Blogger; /* 5: */ import com.blog.service.BloggerService; /* 6: */ import javax.annotation.Resource; /* 7: */ import org.springframework.stereotype.Service; /* 8: */ /* 9: */ @Service("bloggerService") /* 10: */ public class BloggerServiceImpl /* 11: */ implements BloggerService /* 12: */ { /* 13: */ @Resource /* 14: */ private BloggerDao bloggerDao; /* 15: */ /* 16: */ public Blogger find() /* 17: */ { /* 18:23 */ return this.bloggerDao.find(); /* 19: */ } /* 20: */ /* 21: */ public Blogger getByUserName(String userName) /* 22: */ { /* 23:27 */ return this.bloggerDao.getByUserName(userName); /* 24: */ } /* 25: */ /* 26: */ public Integer update(Blogger blogger) /* 27: */ { /* 28:31 */ return this.bloggerDao.update(blogger); /* 29: */ } /* 30: */ } /* Location: D:\classes\ * Qualified Name: com.blog.service.impl.BloggerServiceImpl * JD-Core Version: 0.7.0.1 */
博客类型逻辑类:
BlogType
/* 1: */ package com.blog.service.impl; /* 2: */ /* 3: */ import com.blog.dao.BlogTypeDao; /* 4: */ import com.blog.entity.BlogType; /* 5: */ import com.blog.service.BlogTypeService; /* 6: */ import java.util.List; /* 7: */ import java.util.Map; /* 8: */ import javax.annotation.Resource; /* 9: */ import org.springframework.stereotype.Service; /* 10: */ /* 11: */ @Service("blogTypeService") /* 12: */ public class BlogTypeServiceImpl /* 13: */ implements BlogTypeService /* 14: */ { /* 15: */ @Resource /* 16: */ private BlogTypeDao blogTypeDao; /* 17: */ /* 18: */ public List<BlogType> countList() /* 19: */ { /* 20:26 */ return this.blogTypeDao.countList(); /* 21: */ } /* 22: */ /* 23: */ public List<BlogType> list(Map<String, Object> map) /* 24: */ { /* 25:30 */ return this.blogTypeDao.list(map); /* 26: */ } /* 27: */ /* 28: */ public Long getTotal(Map<String, Object> map) /* 29: */ { /* 30:34 */ return this.blogTypeDao.getTotal(map); /* 31: */ } /* 32: */ /* 33: */ public Integer add(BlogType blogType) /* 34: */ { /* 35:38 */ return this.blogTypeDao.add(blogType); /* 36: */ } /* 37: */ /* 38: */ public Integer update(BlogType blogType) /* 39: */ { /* 40:42 */ return this.blogTypeDao.update(blogType); /* 41: */ } /* 42: */ /* 43: */ public Integer delete(Integer id) /* 44: */ { /* 45:46 */ return this.blogTypeDao.delete(id); /* 46: */ } /* 47: */ } /* Location: D:\classes\ * Qualified Name: com.blog.service.impl.BlogTypeServiceImpl * JD-Core Version: 0.7.0.1 */
评论逻辑类:
Comment
/* 1: */ package com.blog.service.impl; /* 2: */ /* 3: */ import com.blog.dao.CommentDao; /* 4: */ import com.blog.entity.Comment; /* 5: */ import com.blog.service.CommentService; /* 6: */ import java.util.List; /* 7: */ import java.util.Map; /* 8: */ import javax.annotation.Resource; /* 9: */ import org.springframework.stereotype.Service; /* 10: */ /* 11: */ @Service("commentService") /* 12: */ public class CommentServiceImpl /* 13: */ implements CommentService /* 14: */ { /* 15: */ @Resource /* 16: */ private CommentDao commentDao; /* 17: */ /* 18: */ public int add(Comment comment) /* 19: */ { /* 20:26 */ return this.commentDao.add(comment); /* 21: */ } /* 22: */ /* 23: */ public List<Comment> list(Map<String, Object> map) /* 24: */ { /* 25:30 */ return this.commentDao.list(map); /* 26: */ } /* 27: */ /* 28: */ public Long getTotal(Map<String, Object> map) /* 29: */ { /* 30:34 */ return this.commentDao.getTotal(map); /* 31: */ } /* 32: */ /* 33: */ public Integer delete(Integer id) /* 34: */ { /*