APP下载

基于SpringBoot+Mybatis的个人博客系统设计与实现

2021-11-03刘子凡郭昱君

现代信息科技 2021年8期

刘子凡 郭昱君

DOI:10.19850/j.cnki.2096-4706.2021.08.029

摘  要:随着计算机技术的更新发展,信息技术也产生了革命性的变化,信息的传播方式开始向网络化转变,博客网站在此形势下应运而生。然而,现有的第三方博客网站存在各种问题,例如网站的广告多、恶意弹窗等。鉴于此,该文设计了一个小型的个人博客网站,使用的开发语言为Java,采用后端框架SpringBoot、持久层框架Mybatis、前端框架SemanticUI以及模板引擎Thymeleaf。该博客系统具有简洁、轻量化的特点,使人们免去了各种广告、恶意弹窗等烦扰,提供更加方便的博客平台。

关键词:个人博客;SpringBoot;Mybatis;Thymeleaf

中图分类号:TP393.092      文献标识码:A 文章编号:2096-4706(2021)08-0104-05

Design and Implementation of Personal Blog System Based on SpringBoot+Mybatis

LIU Zifan,GUO Yujun

(School of Computer and Software,Jincheng College of Sichuan University,Chengdu  611731,China)

Abstract:With the update and development of computer technology,information technology also has a revolutionary change,the way of information dissemination came to the network,blog website came into being in this situation. However,the existing third-party blog websites have various problems,such as more advertisements,malicious pop ups and so on. In view of this,this paper designs a small personal blog website,using Java as the development language,using the back-end framework SpringBoot,persistence layer framework Mybatis,front-end framework SemanticUI and template engine Thymeleaf. The blog system has the characteristics of simplicity and lightweight,so that people can avoid all kinds of advertisements,malicious pop ups and other annoyances,and provide a more convenient blog platform.

Keywords:personal blog;SpringBoot;Mybatis;Thymeleaf

0  引  言

隨着互联网的快速发展,信息传递的方式也逐渐网络化,博客网站就是一种用来公布个人消息与实现沟通的专业网站,提供基本的沟通和个性化设计[1]功能。然而,过于追求商业化的博客网站却给用户带来了广告、弹窗的烦扰;另外,过于丰富的功能也使网站变得臃肿,操作起来更加烦琐,这无形中为那些追求简洁便利的用户带来莫大的困扰。

1  主要技术介绍

1.1  SpringBoot

SpringBoot是由Pivotal团队设计开发的框架结构,通过简化配置来优化Spring应用的搭建和开发过程。另外,SpringBoot通过集成大量的框架使得依赖包的版本冲突,以及应用的不稳定性问题得到很好的解决[2]。

1.2  Mybatis

Mybatis与Hibernate是Java中最常用的两种ORM框架,其中Hibernate在处理多表关联时可能会出现N+1问题,性能会受到很大影响。若要解决性能受影响的问题,需要使用者具备深厚的Hibernate知识基础和丰富的项目经验[3]。所以本系统中采用了Mybatis,自己编写SQL语句,以便具有一定的可控性,并通过简单的XML或特定注解将Java中的普通对象映射为数据库里的记录。……

登录APP查看全文