毕业设计-基于SpringBoot校园番管理系统

环境:开发工具:idea,数据库:MySQL5.7 jdk1.8
架构:SpringBoot,前端HTML
主要功能
1.普通用户
查看文章信息:文章列表、推荐文章、文章标题、文章内容、发布时间、访问量以及评论等信息
查看分类文章:分类列表、分类文章信息
查看时间轴:按照文章时间发布顺序查看文章
搜索文章:导航栏右边搜索框根据关键字搜索
听音乐:上一曲、下一曲、音量控制、播放顺序控制、查看歌词等
留言:留言并回复
查看友链:查看并访问博主在友链页面添加的友链连接
查看相册信息:相册列表、照片名称、照片拍摄地点、时间、照片描述

2.管理员用户(栈主)
拥有普通用户所有功能权限
登录:在主页路径下加“/admin”,可进入登录页面,根据数据库的用户名和密码进行登录
文章管理:查询文章列表、新增文章、编辑文章、删除文章、搜索文章
分类管理:查询分类列表、新增分类、编辑分类、删除分类
友链管理:查询友链列表、新增友链、编辑友链、删除友链
相册管理:查询相册列表、新增照片、编辑照片、删除照片
消息管理:登录后恢复评论留言会显示栈主的头像信息,并能显示删除消息按键,可以对消息进行删除

项目图片:
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

部分代码:

@Controller
public class IndexController {

    @Autowired
    private BlogDao blogDao;

    @Autowired
    private BlogService blogService;

//    @Autowired
//    private TypeService typeService;

    @Autowired
    private CommentService commentService;

//    分页查询列表
    @GetMapping("/")
    public String index(Model model, @RequestParam(defaultValue = "1",value = "pageNum") Integer pageNum, RedirectAttributes attributes){
        PageHelper.startPage(pageNum,10);
        List<FirstPageBlog> allFirstPageBlog = blogService.getAllFirstPageBlog();
        List<RecommendBlog> recommendedBlog = blogService.getRecommendedBlog(); // 根据推荐进行查询

        PageInfo<FirstPageBlog> pageInfo = new PageInfo<>(allFirstPageBlog);
        model.addAttribute("pageInfo",pageInfo);
        model.addAttribute("recommendedBlogs", recommendedBlog);

        return "index";
    }

//    搜索
    @PostMapping("/search")
    public String search(Model model,
                         @RequestParam(defaultValue = "1", value = "pageNum") Integer pageNum,
                         @RequestParam String query) {
        PageHelper.startPage(pageNum, 1000);
        List<FirstPageBlog> searchBlog = blogService.getSearchBlog(query);
        PageInfo<FirstPageBlog> pageInfo = new PageInfo<>(searchBlog);
        model.addAttribute("pageInfo", pageInfo);
        model.addAttribute("query", query);
        return "search";
    }

//    跳转详情页面
    @GetMapping("/blog/{id}")
    public String blog(@PathVariable Long id, Model model) {
        DetailedBlog detailedBlog = blogService.getDetailedBlog(id);
        List<Comment> comments = commentService.listCommentByBlogId(id);
        model.addAttribute("comments", comments);
        model.addAttribute("blog", detailedBlog);
        return "blog";
    }

//    最新博客列表
//    @GetMapping("/footer/newblog")
//    public String newblogs(Model model) {
//        List<FirstPageBlog> newBlog = blogService.getNewBlog();
//        model.addAttribute("newblogs", newBlog);
//        return "index :: newblogList";
//    }

//    博客信息
    @GetMapping("/footer/blogmessage")
    public String blogMessage(Model model){
        // 总数量
        int blogTotal = blogService.getBlogTotal();
        // 查看数量
        int blogViewTotal = blogService.getBlogViewTotal();
        //评论数量
        int blogCommentTotal = blogService.getBlogCommentTotal();
        // 留言
        int blogMessageTotal = blogService.getBlogMessageTotal();

        model.addAttribute("blogTotal",blogTotal);
        model.addAttribute("blogViewTotal",blogViewTotal);
        model.addAttribute("blogCommentTotal",blogCommentTotal);
        model.addAttribute("blogMessageTotal",blogMessageTotal);
        return "index :: blogMessage";
    }

获取方式:联系下方名片获取

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

计算机毕业设计,

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值