Code Monkey home page Code Monkey logo

blog's Introduction

简介

基于SpringBoot搭建的开源个人博客系统,主题基于Hexo主题hexo-theme-gal进行修改。

技术栈:SpringBoot、Thymeleaf、MySQL、MyBatis-Plus、Lombok、Gson、caffeine、validation、Bootstrap、jQuery、FontAwesome、Jsoup……

示例博客:周华个人博客

快速开始

  1. 下载本项目,并使用IDE打开

  2. 新建数据库blog并运行项目

    现在运行项目会自动运行SQL脚本建表和插入初始数据

  3. 修改application-dev.yml中的数据库配置信息

  4. 运行BlogApplication.java,启动项目

  5. 浏览器访问http://127.0.0.1:8080/

使用 Idea,Eclipse 等IDE运行需要安装Lombok插件,JDK版本要求1.8+。

部署

jar部署

配置好application-prod.yml中的配置信息,然后打包:

mvn clean package -Dmaven.test.skip=true

将打包好的blog.jarblog.sh放到同一文件夹下,执行命令:

# 使脚本具有执行权限
chmod +x ./blog.sh
# 启动项目
./blog.sh start
# 或者直接使用sh命令运行脚本
sh blog.sh start

tomcat部署

修改application.ymlspring.profiles.activeprod,并配置好application-prod.yml中的配置信息。

直接修改pom.xml中的打包方式为war后进行打包,或直接运行命令:

clean package war:war -Dmaven.test.skip=true

然后将打包好的blog.war丢进tomcat中运行即可!

docker部署

将整个项目丢到服务器,进入项目文件夹blog,执行命令docker-compose up -d即可(需先安装docker-compose)。

后台管理

后台采用前后端分离的方式实现,源码位于vue文件夹下https://github.com/iszhouhua/blog/tree/master/vue


其他

有想联系我的,可以加我QQ或微信,备注GitHub。欢迎大家联系,一起成长,有好的建议和想法可以提供给我。


微信二维码


QQ二维码


界面展示

1557279251039

20190508095012

20190508095714

20190508101138

20190508101254

20190508101400

20190508101440

20190508101544

20190508101622

2019.5.1

添加规则管理,转载文章时可直接根据规则自动装配内容。

2019.5.8

添加云存储支持,包括七牛云、阿里云、腾讯云。

2019.11.5

加入记住密码功能

2020.3.5

修改数据库脚本,改为运行时自动运行脚本,方便后续修改数据库结构

2020.3.18

修改日志记录,修复无法评论的bug

2020.5.27

缓存改用caffeine

2020.9.4

很久没看,发现网站被脚本搞挂了。这次改了很多东西,把评论、用户模块重做了一遍。

2020.9.10

增加当前登录用户参数注入,修复一些上次改动引起的bug

2020.11.28

修复文件流未关闭引起的Too many open files问题

2021.4.15

使用flyway进行数据库版本管理,抛弃掉之前的初始化方法

2021.6.13

加入获取邮箱验证码功能,支持Gitee和GitHub登录

blog's People

Contributors

iszhouhua avatar im-andy avatar dependabot[bot] avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.