...
 
Commits (10)
    https://gitcode.net/u011197448/oneblog/-/commit/7dfe30728db22ed1c21fb161af28a79ec2dcb530 :bulb: 每晚凌晨12点自动检查友联,对于私自取消友联的网站实行自动封禁 2021-11-01T21:34:08+08:00 yadong.zhang yadong.zhang0415@gmail.com https://gitcode.net/u011197448/oneblog/-/commit/32077bce59692db19646b49dd214cc06bc346a88 :sparkles: 文章支持设置【登录后可见】 2021-11-01T21:53:53+08:00 yadong.zhang yadong.zhang0415@gmail.com https://gitcode.net/u011197448/oneblog/-/commit/02edfb2cc645929278add7b8a0a02d2734c4fde8 :sparkles: 文章支持设置【登录后可见】 2021-11-01T21:58:00+08:00 yadong.zhang yadong.zhang0415@gmail.com https://gitcode.net/u011197448/oneblog/-/commit/a1a1339931ffce90d77b578697a871f997a7c6d3 :sparkles: 文章支持设置【登录后可见】 2021-11-01T21:58:37+08:00 yadong.zhang yadong.zhang0415@gmail.com https://gitcode.net/u011197448/oneblog/-/commit/c838b2d9822d4277d96ad92fd9d970545b678a8a :bulb: 优化web端的分类展示,支持以滚动菜单的形式展示分类,防止因分类太多导致菜单栏溢出的问题 2021-11-02T12:57:03+08:00 yadong.zhang yadong.zhang0415@gmail.com https://gitcode.net/u011197448/oneblog/-/commit/4046d225b922da74164f22fad3699c482032c910 :bulb: 优化侧边栏文章列表的 header 样式 2021-11-02T13:31:34+08:00 yadong.zhang yadong.zhang0415@gmail.com https://gitcode.net/u011197448/oneblog/-/commit/3063e7cbb89256fa58ae2399c035cf9d6bab2f0b :bulb: 优化广告位,增加【首页顶部】广告位 2021-11-02T13:52:12+08:00 yadong.zhang yadong.zhang0415@gmail.com https://gitcode.net/u011197448/oneblog/-/commit/8d9157aa6b9e55f6dde8eeeeb58a205d5a058b93 :bulb: 支持禁用一言插件(该插件部分时候加载较慢) 2021-11-02T14:07:54+08:00 yadong.zhang yadong.zhang0415@gmail.com https://gitcode.net/u011197448/oneblog/-/commit/fc814fd81f932b2b4148197aebc4fc209f0a18aa :bulb: 优化代码 2021-11-02T20:32:22+08:00 yadong.zhang yadong.zhang0415@gmail.com https://gitcode.net/u011197448/oneblog/-/commit/4401b4b710a687ce08e0e88abfb39929e51bf456 :bookmark: 升级到 2.3.3 2021-11-05T17:38:21+08:00 yadong.zhang yadong.zhang0415@gmail.com
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<parent> <parent>
<groupId>com.zyd</groupId> <groupId>com.zyd</groupId>
<artifactId>blog</artifactId> <artifactId>blog</artifactId>
<version>2.3.2</version> <version>2.3.3</version>
</parent> </parent>
<dependencies> <dependencies>
......
package com.zyd.blog.core.schedule;
import com.zyd.blog.business.entity.Link;
import com.zyd.blog.business.enums.ConfigKeyEnum;
import com.zyd.blog.business.service.SysConfigService;
import com.zyd.blog.business.service.SysLinkService;
import com.zyd.blog.business.util.LinksUtil;
import com.zyd.blog.persistence.beans.SysConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import java.util.List;
/**
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0.0
* @since 1.0.0
*/
@Slf4j
@Component
public class FriendlyLinkTask {
@Autowired
private SysLinkService sysLinkService;
@Autowired
private SysConfigService sysConfigService;
@Value("${app.enableAutoCheckLink}")
private boolean enableAutoCheckLink;
/**
* 每晚凌晨12点,检查友情链接
*/
@Scheduled(cron = "0 0 0 * * ?")
public void check() {
// 未开启自动检查友联的功能
if (!enableAutoCheckLink) {
return;
}
List<Link> linkList = sysLinkService.listAll();
if (CollectionUtils.isEmpty(linkList)) {
return;
}
SysConfig sysConfig = sysConfigService.getByKey(ConfigKeyEnum.DOMAIN.getKey());
if (StringUtils.isEmpty(sysConfig)) {
return;
}
String domain = sysConfig.getConfigValue();
for (Link link : linkList) {
if (!link.isStatus()) {
// 被禁用的网站如果又包含了本站链接,说明其已经恢复本站的友联
// 因此自动恢复其友联
if (LinksUtil.hasLinkByHtml(link.getUrl(), domain)
|| LinksUtil.hasLinkByChinaz(link.getUrl(), domain)) {
link.setStatus(true);
link.setDescription("");
sysLinkService.updateSelective(link);
}
continue;
}
// 已经不存在本站链接,自动下架该网站的友联
if (!(LinksUtil.hasLinkByHtml(link.getUrl(), domain))
&& !LinksUtil.hasLinkByChinaz(link.getUrl(), domain)) {
link.setStatus(false);
link.setDescription("系统检测到该网站已经取消本站的链接,因此自动封禁其友链");
sysLinkService.updateSelective(link);
log.info("系统监测到该网站([{}])已经私自取消本站链接,因此自动下架的友联", link.getName());
}
}
}
}
...@@ -17,6 +17,10 @@ logging: ...@@ -17,6 +17,10 @@ logging:
app: app:
# 是否启用kaptcha验证码 # 是否启用kaptcha验证码
enableKaptcha: ${ONEBLOG_APP_ENABLE_KAPTCHA:false} enableKaptcha: ${ONEBLOG_APP_ENABLE_KAPTCHA:false}
# 是否启用自动校验友情链接的功能
# 请选择打开,一旦打开,每晚凌晨12点会自动检查友联,对于不包含本站链接的网站实行自动封禁
# 目前暂时没实现白名单的功能
enableAutoCheckLink: ${ONEBLOG_APP_ENABLE_CHECK_LINK:false}
# 启用后,项目在启动时会打印数据库(Mysql和Redis)链接信息(包含密码) # 启用后,项目在启动时会打印数据库(Mysql和Redis)链接信息(包含密码)
# 代码请参考 # 代码请参考
enabledPrintConfig: ${ONEBLOG_APP_ENABLE_PRINT_CONFIG:false} enabledPrintConfig: ${ONEBLOG_APP_ENABLE_PRINT_CONFIG:false}
......
...@@ -23,6 +23,15 @@ ...@@ -23,6 +23,15 @@
</div> </div>
<@addOrUpdateMOdal defaultTitle="添加分类"> <@addOrUpdateMOdal defaultTitle="添加分类">
<input type="hidden" name="id"> <input type="hidden" name="id">
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="type">显示位置 <span class="required">*</span></label>
<div class="col-md-6 col-sm-6 col-xs-6">
<select id="position" name="position" class="form-control col-md-5 col-xs-5" required="required">
<option value="nav">顶部菜单(不适宜太多)</option>
<option value="scrollmenu">首页滚动菜单(理论上可以有无限多个横向排列)</option>
</select>
</div>
</div>
<div class="item form-group"> <div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">名称 <span class="required">*</span></label> <label class="control-label col-md-3 col-sm-3 col-xs-12" for="name">名称 <span class="required">*</span></label>
<div class="col-md-6 col-sm-6 col-xs-12"> <div class="col-md-6 col-sm-6 col-xs-12">
...@@ -131,6 +140,13 @@ ...@@ -131,6 +140,13 @@
} }
return '<a href="' + appConfig.wwwPath + '/type/' + parent.id + '" target="_blank">' + parent.name + '</a>'; return '<a href="' + appConfig.wwwPath + '/type/' + parent.id + '" target="_blank">' + parent.name + '</a>';
} }
}, {
field: 'position',
title: '显示位置',
width: '100px',
formatter: function (code) {
return code ? code : '-';
}
}, { }, {
field: 'description', field: 'description',
title: '描述', title: '描述',
......
...@@ -50,6 +50,9 @@ ...@@ -50,6 +50,9 @@
<li role="presentation" class=""> <li role="presentation" class="">
<a href="#tab_hunter" role="tab" id="hunter-tab" data-toggle="tab" aria-expanded="false"><i class="fa fa-bug fa-fw"></i> Hunter 配置</a> <a href="#tab_hunter" role="tab" id="hunter-tab" data-toggle="tab" aria-expanded="false"><i class="fa fa-bug fa-fw"></i> Hunter 配置</a>
</li> </li>
<li role="presentation" class="">
<a href="#tab_plugin" role="tab" id="plugin-tab" data-toggle="tab" aria-expanded="false"><i class="fa fa-plug fa-fw"></i> Plugin</a>
</li>
</ul> </ul>
<div id="myTabContent" class="tab-content"> <div id="myTabContent" class="tab-content">
<div role="tabpanel" class="tab-pane fade active in" id="tab_basic" <div role="tabpanel" class="tab-pane fade active in" id="tab_basic"
...@@ -651,6 +654,26 @@ ...@@ -651,6 +654,26 @@
</div> </div>
</form> </form>
</div> </div>
<div role="tabpanel" class="tab-pane fade" id="tab_plugin" aria-labelledby="plugin-tab">
<form class="form-horizontal form-label-left" novalidate>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="maintenance">启用 Hitokoto(一言)
<i class="fa fa-question-circle" title="一言,随机显示一句话的插件,该插件部分时候加载较慢,如果不需要请自行关闭"></i> </label>
<div class="col-md-6 col-sm-6 col-xs-12 fixed-radio-checkbox">
<ul class="list-unstyled list-inline">
<li><label for="maintenance" class="pointer"> <input type="radio" class="square" checked name="enableHitokoto" value="1"> 显示 </label> </li>
<li><label for="maintenance" class="pointer"> <input type="radio" class="square" name="enableHitokoto" value="0"> 关闭 </label></li>
</ul>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="comment"></label>
<div class="col-md-6 col-sm-6 col-xs-12">
<button type="button" class="btn btn-primary saveBtn"><i class="fa fa-save"> 保存</i></button>
</div>
</div>
</form>
</div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -183,6 +183,15 @@ ...@@ -183,6 +183,15 @@
<input type="text" class="square form-control" name="password" placeholder="请输入文章密码"> <input type="text" class="square form-control" name="password" placeholder="请输入文章密码">
</div> </div>
</div> </div>
<div class="item form-group">
<label class="control-label col-md-2 col-sm-2 col-xs-12" for="comment">登录后可见? </label>
<div class="col-md-10 col-sm-10 col-xs-12 fixed-radio-checkbox">
<ul class="list-unstyled list-inline">
<li><input type="radio" class="square" name="requiredAuth" value="1"></li>
<li><input type="radio" class="square" checked name="requiredAuth" value="0"></li>
</ul>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<parent> <parent>
<groupId>com.zyd</groupId> <groupId>com.zyd</groupId>
<artifactId>blog</artifactId> <artifactId>blog</artifactId>
<version>2.3.2</version> <version>2.3.3</version>
</parent> </parent>
<dependencies> <dependencies>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<parent> <parent>
<groupId>com.zyd</groupId> <groupId>com.zyd</groupId>
<artifactId>blog</artifactId> <artifactId>blog</artifactId>
<version>2.3.2</version> <version>2.3.3</version>
</parent> </parent>
<dependencies> <dependencies>
......
...@@ -142,6 +142,15 @@ public class Article { ...@@ -142,6 +142,15 @@ public class Article {
this.bizArticle.setRecommended(value); this.bizArticle.setRecommended(value);
} }
public boolean getRequiredAuth() {
Boolean value = this.bizArticle.getRequiredAuth();
return value != null && value;
}
public void setRequiredAuth(Boolean requiredAuth) {
this.bizArticle.setRequiredAuth(requiredAuth);
}
public boolean isOriginal() { public boolean isOriginal() {
Boolean value = this.bizArticle.getOriginal(); Boolean value = this.bizArticle.getOriginal();
return value != null ? value : false; return value != null ? value : false;
......
...@@ -90,6 +90,14 @@ public class Type { ...@@ -90,6 +90,14 @@ public class Type {
this.bizType.setIcon(icon); this.bizType.setIcon(icon);
} }
public String getPosition() {
return this.bizType.getPosition();
}
public void setPosition(String position) {
this.bizType.setPosition(position);
}
public Date getCreateTime() { public Date getCreateTime() {
return this.bizType.getCreateTime(); return this.bizType.getCreateTime();
} }
......
...@@ -19,6 +19,10 @@ import java.util.Map; ...@@ -19,6 +19,10 @@ import java.util.Map;
@AllArgsConstructor @AllArgsConstructor
public enum AdPositionEnum { public enum AdPositionEnum {
/**
* 首页顶部
*/
HOMEPAGE_TOP("首页顶部"),
/** /**
* 每次刷新页面都弹窗显示,AdType 必须为 POP * 每次刷新页面都弹窗显示,AdType 必须为 POP
*/ */
......
...@@ -245,6 +245,11 @@ public enum ConfigKeyEnum { ...@@ -245,6 +245,11 @@ public enum ConfigKeyEnum {
* blog-hunter 配置文件,如果没有添加该配置,则默认取 src/main/resources/HunterConfig.json * blog-hunter 配置文件,如果没有添加该配置,则默认取 src/main/resources/HunterConfig.json
*/ */
BLOG_HUNTER_CONFIG("blogHunterConfig"), BLOG_HUNTER_CONFIG("blogHunterConfig"),
/**
* 启用 Hitokoto(一言)。一言,随机显示一句话的插件,该插件部分时候加载较慢,如果不需要请自行关闭
*/
ENABLE_HITOKOTO("enableHitokoto"),
; ;
private final String key; private final String key;
......
...@@ -30,4 +30,6 @@ public interface BizTypeService extends AbstractService<Type, Long> { ...@@ -30,4 +30,6 @@ public interface BizTypeService extends AbstractService<Type, Long> {
List<Type> listParent(); List<Type> listParent();
List<Type> listTypeForMenu(); List<Type> listTypeForMenu();
List<Type> listTypeByPosition(String position);
} }
...@@ -15,6 +15,8 @@ import org.springframework.stereotype.Service; ...@@ -15,6 +15,8 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import tk.mybatis.mapper.entity.Example;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
...@@ -64,6 +66,17 @@ public class BizTypeServiceImpl implements BizTypeService { ...@@ -64,6 +66,17 @@ public class BizTypeServiceImpl implements BizTypeService {
return getTypes(entityList); return getTypes(entityList);
} }
@Override
public List<Type> listTypeByPosition(String position) {
Example example = new Example(BizType.class);
Example.Criteria criteria = example.createCriteria();
criteria.andEqualTo("position", StringUtils.isEmpty(position) ? "scrollmenu" : position)
.andEqualTo("available", true);
example.setOrderByClause("sort ASC");
List<BizType> entityList = bizTypeMapper.selectByExample(example);
return getTypes(entityList);
}
private List<Type> getTypes(List<BizType> list) { private List<Type> getTypes(List<BizType> list) {
if (CollectionUtils.isEmpty(list)) { if (CollectionUtils.isEmpty(list)) {
return null; return null;
......
...@@ -64,6 +64,11 @@ public class CustomTags extends BaseTag { ...@@ -64,6 +64,11 @@ public class CustomTags extends BaseTag {
return bizTypeService.listTypeForMenu(); return bizTypeService.listTypeForMenu();
} }
public Object scrollmenus(Map params) {
String position = getParam(params, "position");
return bizTypeService.listTypeByPosition(position);
}
public Object tagsList(Map params) { public Object tagsList(Map params) {
return bizTagsService.listAll(); return bizTagsService.listAll();
} }
......
...@@ -38,6 +38,7 @@ public class BizArticle extends AbstractDO { ...@@ -38,6 +38,7 @@ public class BizArticle extends AbstractDO {
private String keywords; private String keywords;
private Boolean comment; private Boolean comment;
private String password; private String password;
private Boolean requiredAuth;
private String editorType; private String editorType;
@Transient @Transient
private Integer lookCount; private Integer lookCount;
......
...@@ -23,6 +23,7 @@ public class BizType extends AbstractDO { ...@@ -23,6 +23,7 @@ public class BizType extends AbstractDO {
private Integer sort; private Integer sort;
private Boolean available; private Boolean available;
private String icon; private String icon;
private String position;
@Transient @Transient
......
...@@ -86,5 +86,5 @@ pagehelper: ...@@ -86,5 +86,5 @@ pagehelper:
params: count=countSql params: count=countSql
app: app:
version: v2.3.2 version: v2.3.3
enableRedisCache: ${ONEBLOG_ENABLE_REDIS_CACHE:false} enableRedisCache: ${ONEBLOG_ENABLE_REDIS_CACHE:false}
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
<result property="updateTime" jdbcType="TIMESTAMP" column="update_time"/> <result property="updateTime" jdbcType="TIMESTAMP" column="update_time"/>
<result property="comment" jdbcType="BIT" column="comment"/> <result property="comment" jdbcType="BIT" column="comment"/>
<result property="password" jdbcType="VARCHAR" column="password"/> <result property="password" jdbcType="VARCHAR" column="password"/>
<result property="requiredAuth" jdbcType="BIT" column="required_auth"/>
<result property="lookCount" jdbcType="INTEGER" column="look_count"/> <result property="lookCount" jdbcType="INTEGER" column="look_count"/>
<result property="commentCount" jdbcType="INTEGER" column="comment_count"/> <result property="commentCount" jdbcType="INTEGER" column="comment_count"/>
...@@ -58,6 +59,7 @@ ...@@ -58,6 +59,7 @@
a.`comment`, a.`comment`,
a.`editor_type`, a.`editor_type`,
a.`password`, a.`password`,
a.`required_auth`,
a.create_time, a.create_time,
a.update_time, a.update_time,
btype.id AS btype_id, btype.id AS btype_id,
...@@ -159,6 +161,7 @@ ...@@ -159,6 +161,7 @@
a.keywords, a.keywords,
a.`comment`, a.`comment`,
a.`password`, a.`password`,
a.`required_auth`,
a.create_time, a.create_time,
a.update_time, a.update_time,
btype.id AS btype_id, btype.id AS btype_id,
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<result property="sort" jdbcType="INTEGER" column="sort"/> <result property="sort" jdbcType="INTEGER" column="sort"/>
<result property="available" jdbcType="BIT" column="available"/> <result property="available" jdbcType="BIT" column="available"/>
<result property="icon" jdbcType="VARCHAR" column="icon"/> <result property="icon" jdbcType="VARCHAR" column="icon"/>
<result property="position" jdbcType="VARCHAR" column="position"/>
<result property="createTime" jdbcType="TIMESTAMP" column="create_time"/> <result property="createTime" jdbcType="TIMESTAMP" column="create_time"/>
<result property="updateTime" jdbcType="TIMESTAMP" column="update_time"/> <result property="updateTime" jdbcType="TIMESTAMP" column="update_time"/>
<association property="parent" javaType="com.zyd.blog.persistence.beans.BizType"> <association property="parent" javaType="com.zyd.blog.persistence.beans.BizType">
...@@ -19,6 +20,7 @@ ...@@ -19,6 +20,7 @@
<result property="description" jdbcType="VARCHAR" column="parent_description"/> <result property="description" jdbcType="VARCHAR" column="parent_description"/>
<result property="available" jdbcType="BIT" column="parent_available"/> <result property="available" jdbcType="BIT" column="parent_available"/>
<result property="icon" jdbcType="VARCHAR" column="parent_icon"/> <result property="icon" jdbcType="VARCHAR" column="parent_icon"/>
<result property="position" jdbcType="VARCHAR" column="parent_position"/>
</association> </association>
<collection property="nodes" column="node_id" javaType="ArrayList" ofType="com.zyd.blog.persistence.beans.BizType"> <collection property="nodes" column="node_id" javaType="ArrayList" ofType="com.zyd.blog.persistence.beans.BizType">
<result property="id" jdbcType="BIGINT" column="node_id"/> <result property="id" jdbcType="BIGINT" column="node_id"/>
...@@ -27,6 +29,7 @@ ...@@ -27,6 +29,7 @@
<result property="description" jdbcType="VARCHAR" column="node_description"/> <result property="description" jdbcType="VARCHAR" column="node_description"/>
<result property="available" jdbcType="BIT" column="node_available"/> <result property="available" jdbcType="BIT" column="node_available"/>
<result property="icon" jdbcType="VARCHAR" column="node_icon"/> <result property="icon" jdbcType="VARCHAR" column="node_icon"/>
<result property="position" jdbcType="VARCHAR" column="node_position"/>
</collection> </collection>
</resultMap> </resultMap>
...@@ -38,7 +41,8 @@ ...@@ -38,7 +41,8 @@
parent.`name` parent_name, parent.`name` parent_name,
parent.description parent_description, parent.description parent_description,
parent.available parent_available, parent.available parent_available,
parent.icon parent_icon parent.icon parent_icon,
parent.position parent_position
FROM FROM
biz_type t biz_type t
LEFT JOIN biz_type parent ON t.pid = parent.id LEFT JOIN biz_type parent ON t.pid = parent.id
...@@ -83,13 +87,15 @@ ...@@ -83,13 +87,15 @@
node.`name` node_name, node.`name` node_name,
node.description node_description, node.description node_description,
node.available node_available, node.available node_available,
node.icon node_icon node.icon node_icon,
node.position node_position
FROM FROM
biz_type t biz_type t
LEFT JOIN biz_type parent ON t.pid = parent.id LEFT JOIN biz_type parent ON t.pid = parent.id
LEFT JOIN biz_type node ON node.pid = t.id LEFT JOIN biz_type node ON node.pid = t.id
WHERE WHERE
t.available = 1 t.available = 1
AND t.position = 'nav'
AND (t.pid IS NULL OR t.pid = '') AND (t.pid IS NULL OR t.pid = '')
ORDER BY ORDER BY
t.sort ASC t.sort ASC
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<parent> <parent>
<groupId>com.zyd</groupId> <groupId>com.zyd</groupId>
<artifactId>blog</artifactId> <artifactId>blog</artifactId>
<version>2.3.2</version> <version>2.3.3</version>
</parent> </parent>
<properties> <properties>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<parent> <parent>
<groupId>com.zyd</groupId> <groupId>com.zyd</groupId>
<artifactId>blog</artifactId> <artifactId>blog</artifactId>
<version>2.3.2</version> <version>2.3.3</version>
</parent> </parent>
<dependencies> <dependencies>
......
...@@ -3,6 +3,7 @@ package com.zyd.blog.controller; ...@@ -3,6 +3,7 @@ package com.zyd.blog.controller;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.zyd.blog.business.annotation.BussinessLog; import com.zyd.blog.business.annotation.BussinessLog;
import com.zyd.blog.business.entity.Article; import com.zyd.blog.business.entity.Article;
import com.zyd.blog.business.entity.User;
import com.zyd.blog.business.enums.ArticleStatusEnum; import com.zyd.blog.business.enums.ArticleStatusEnum;
import com.zyd.blog.business.enums.PlatformEnum; import com.zyd.blog.business.enums.PlatformEnum;
import com.zyd.blog.business.service.BizArticleArchivesService; import com.zyd.blog.business.service.BizArticleArchivesService;
...@@ -11,6 +12,7 @@ import com.zyd.blog.business.service.SysLinkService; ...@@ -11,6 +12,7 @@ import com.zyd.blog.business.service.SysLinkService;
import com.zyd.blog.business.service.SysUpdateRecordeService; import com.zyd.blog.business.service.SysUpdateRecordeService;
import com.zyd.blog.business.vo.ArticleConditionVO; import com.zyd.blog.business.vo.ArticleConditionVO;
import com.zyd.blog.util.ResultUtil; import com.zyd.blog.util.ResultUtil;
import com.zyd.blog.util.SessionUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.ui.Model;
...@@ -19,7 +21,6 @@ import org.springframework.web.bind.annotation.PathVariable; ...@@ -19,7 +21,6 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpSession;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -188,11 +189,17 @@ public class RenderController { ...@@ -188,11 +189,17 @@ public class RenderController {
if (article == null || ArticleStatusEnum.UNPUBLISHED.getCode() == article.getStatusEnum().getCode()) { if (article == null || ArticleStatusEnum.UNPUBLISHED.getCode() == article.getStatusEnum().getCode()) {
return ResultUtil.forward("/error/404"); return ResultUtil.forward("/error/404");
} }
if(article.getPrivate()) { if (article.getPrivate()) {
article.setPassword(null); article.setPassword(null);
article.setContent(null); article.setContent(null);
article.setContentMd(null); article.setContentMd(null);
} }
if (article.getRequiredAuth()) {
User sessionUser = SessionUtil.getUser();
if (null != sessionUser) {
article.setRequiredAuth(false);
}
}
model.addAttribute("article", article); model.addAttribute("article", article);
// 上一篇下一篇 // 上一篇下一篇
model.addAttribute("other", bizArticleService.getPrevAndNextArticles(article.getCreateTime())); model.addAttribute("other", bizArticleService.getPrevAndNextArticles(article.getCreateTime()));
......
...@@ -18,7 +18,7 @@ braum: ...@@ -18,7 +18,7 @@ braum:
limit: limit:
access: access:
type: redis type: redis
threshold: 15 threshold: 30
interval: 5000 interval: 5000
####################################自定义配置########################################## ####################################自定义配置##########################################
......
...@@ -500,7 +500,7 @@ a:-webkit-any-link { ...@@ -500,7 +500,7 @@ a:-webkit-any-link {
} }
.article-blockquote-green { .article-blockquote-green {
background: #427e53; background: #4dab68;
} }
.article-original-green { .article-original-green {
background: #5FB878; background: #5FB878;
...@@ -541,10 +541,11 @@ a:-webkit-any-link { ...@@ -541,10 +541,11 @@ a:-webkit-any-link {
/* 面包屑导航 */ /* 面包屑导航 */
.breadcrumb { .breadcrumb {
padding: 4px; padding: 10px;
margin-bottom: 10px; margin-bottom: 10px;
list-style: none; list-style: none;
background-color: #ffffff; background-color: #ffffff;
border-radius: 0;
} }
/* 面包屑导航 */ /* 面包屑导航 */
...@@ -841,22 +842,19 @@ span.separation:AFTER { ...@@ -841,22 +842,19 @@ span.separation:AFTER {
} }
.sidebar-module .sidebar-tabs { .sidebar-module .sidebar-tabs {
background-color: #eee; text-align: center;
background-color: unset;
margin-left: -9px; margin-left: -9px;
margin-right: -9px; margin-right: -9px;
} }
.sidebar-module .sidebar-tabs li.active { .sidebar-module .sidebar-tabs li.active, .sidebar-module .sidebar-tabs li.active a {
font-weight: 700; background-color: #eee!important;
} }
.sidebar-module .sidebar-tabs li.hover { .sidebar-module .sidebar-tabs li.hover, .sidebar-module .sidebar-tabs li:hover a {
background-color: #333;
}
.sidebar-module .sidebar-tabs li a:hover {
font-weight: 700; font-weight: 700;
background-color: #333; background-color: #333!important;
} }
.sidebar-module .tab-content .empty-list { .sidebar-module .tab-content .empty-list {
...@@ -1051,10 +1049,10 @@ span.separation:AFTER { ...@@ -1051,10 +1049,10 @@ span.separation:AFTER {
.separateline span { .separateline span {
position: relative; position: relative;
top: -14px; top: -12px;
padding: 2px 4px; padding: 2px 4px;
/*border:1px solid #d6d6d6;*/ /*border:1px solid #d6d6d6;*/
background-color: #ffffff; background-color: #ffffffa3;
color: #006741 !important; color: #006741 !important;
} }
...@@ -2479,6 +2477,7 @@ nav a:first-child .meta-nav { ...@@ -2479,6 +2477,7 @@ nav a:first-child .meta-nav {
.about-main { .about-main {
font-size: 14px; font-size: 14px;
padding: 0 15px; padding: 0 15px;
text-align: center;
} }
.about-img { .about-img {
...@@ -3611,8 +3610,8 @@ img { ...@@ -3611,8 +3610,8 @@ img {
/* 广告 */ /* 广告 */
.ad-mark { .ad-mark {
padding: 8px;
position: relative; position: relative;
margin-bottom: 10px;
} }
.ad-mark:after { .ad-mark:after {
...@@ -3623,3 +3622,49 @@ img { ...@@ -3623,3 +3622,49 @@ img {
color: #e8e8e8; color: #e8e8e8;
font-size: 12px; font-size: 12px;
} }
div.scrollmenu {
overflow: auto;
white-space: nowrap;
background-color: #ffffff!important;
}
div.scrollmenu a, div.scrollmenu span {
display: inline-block;
color: #333;
text-align: center;
padding: 10px;
text-decoration: none;
}
div.scrollmenu a.active, div.scrollmenu a:hover {
background-color: #eeeeee!important;
}
.ob-alert {
background: #fffcef;
padding: 15px;
color: #db7c22;
border: 1px solid #ffbb76;
}
.ob-alert .title {
display: flex;
align-items: center;
margin-bottom: 10px;
font-size: 15px;
font-weight: 500
}
.ob-alert .title .icon {
width: 20px;
height: 20px;
margin-right: 8px
}
.ob-alert .content {
padding: 0;
padding-left: 28px;
}
...@@ -43,6 +43,8 @@ ...@@ -43,6 +43,8 @@
</div> </div>
<@footer> <@footer>
<script src="https://v1.hitokoto.cn/?encode=js&c=i&select=%23hitokoto" defer></script> <#if (config.enableHitokoto == 1 || config.enableHitokoto == "1")>
<script src="https://v1.hitokoto.cn/?encode=js&c=i&select=.hitokoto" defer></script>
</#if>
</@footer> </@footer>
</@compress> </@compress>
...@@ -18,7 +18,9 @@ ...@@ -18,7 +18,9 @@
<@zhydTag method="siteInfo"> <@zhydTag method="siteInfo">
<div class="archives-meta"> 站点统计:${siteInfo.typeCount!(0)}个分类&nbsp;&nbsp; ${siteInfo.tagCount!(0)}个标签&nbsp;&nbsp; ${siteInfo.articleCount!(0)}篇文章&nbsp;&nbsp; ${siteInfo.commentCount!(0)}条留言&nbsp;&nbsp; 最后更新:${siteInfo.lastUpdateTime} </div> <div class="archives-meta"> 站点统计:${siteInfo.typeCount!(0)}个分类&nbsp;&nbsp; ${siteInfo.tagCount!(0)}个标签&nbsp;&nbsp; ${siteInfo.articleCount!(0)}篇文章&nbsp;&nbsp; ${siteInfo.commentCount!(0)}条留言&nbsp;&nbsp; 最后更新:${siteInfo.lastUpdateTime} </div>
</@zhydTag> </@zhydTag>
<p class="blog-description hitokoto"></p> <#if (config.enableHitokoto == 1 || config.enableHitokoto == "1")>
<p class="blog-description hitokoto"></p>
</#if>
</div> </div>
<div class="archives-body"> <div class="archives-body">
<div class="archives-box overflow-initial"> <div class="archives-box overflow-initial">
...@@ -48,9 +50,6 @@ ...@@ -48,9 +50,6 @@
</#list> </#list>
</div> </div>
</div> </div>
<div class="article-footer overflow-initial">
<span class="blog-description hitokoto num"></span>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -79,6 +78,8 @@ ...@@ -79,6 +78,8 @@
})(); })();
}); });
</script> </script>
<script src="https://v1.hitokoto.cn/?encode=js&c=i&select=.hitokoto%27);dom=$('.hitokoto');for(var i=0;i<dom.length;i%2B%2B){dom[i].innerText=hitokoto;}})()//" defer></script> <#if (config.enableHitokoto == 1 || config.enableHitokoto == "1")>
<script src="https://v1.hitokoto.cn/?encode=js&c=i&select=.hitokoto" defer></script>
</#if>
</@footer> </@footer>
</@compress> </@compress>
...@@ -39,15 +39,34 @@ ...@@ -39,15 +39,34 @@
<strong>${article.title}</strong> <strong>${article.title}</strong>
</h1> </h1>
<div class="blog-info-body ${article.isMarkdown?string('markdown-body editor-preview-active-side', '')}"> <div class="blog-info-body ${article.isMarkdown?string('markdown-body editor-preview-active-side', '')}">
<#if article.private> <#-- 文章最后修改日期的判断 -->
${article.description!} <#assign intervalDayNum=((.now?long - article.updateTime?long)?abs / (1000 * 60 * 60 * 24))?int>
<#if intervalDayNum gt 1>
<br> <div class="ob-alert">
<div class="title">
<i class="fa fa-bullhorn fa-fw"></i>
<span class="text">温馨提示:</span>
</div>
<div class="content">
本文最后更新于 ${article.updateTime?string('yyyy年MM月dd日')},已超过 ${intervalDayNum} 天没有更新。若文章内的图片失效(无法正常加载),请留言反馈或直接<a href="mailto:${config.authorEmail}" target="_blank" title="点击给我发邮件" rel="external nofollow"><i class="fa fa fa-envelope fa-fw"></i>联系我</a>。
</div>
</div>
</#if>
<#if article.requiredAuth>
<div class="alert alert-warning alert-dismissible fade in red" role="alert"> <div class="alert alert-warning alert-dismissible fade in red" role="alert">
<i class="fa fa-lock fa-fw"></i> 文章已被加密,需要 <a href="javascript:void(0)" data-toggle="modal" data-target="#lockModal">输入密码</a> 才能查看文章详情 <i class="fa fa-lock fa-fw"></i> 该文章已被加密,需要 <a href="javascript:void(0)" data-toggle="modal" data-target="#oauth" rel="nofollow" title="授权登录">登录后</a> 才能查看文章详情
</div> </div>
<#else > <#else >
${article.content} <#if article.private>
${article.description!}
<br>
<div class="alert alert-warning alert-dismissible fade in red" role="alert">
<i class="fa fa-lock fa-fw"></i> 文章已被加密,需要 <a href="javascript:void(0)" data-toggle="modal" data-target="#lockModal">输入密码</a> 才能查看文章详情
</div>
<#else >
${article.content}
</#if>
</#if> </#if>
</div> </div>
<div class="separateline"><span>正文到此结束</span></div> <div class="separateline"><span>正文到此结束</span></div>
...@@ -91,10 +110,14 @@ ...@@ -91,10 +110,14 @@
<a href="javascript:;;" class="c-label" data-original-title="暂无相关标签" data-toggle="tooltip" data-placement="bottom" target="_blank">暂无相关标签</a> <a href="javascript:;;" class="c-label" data-original-title="暂无相关标签" data-toggle="tooltip" data-placement="bottom" target="_blank">暂无相关标签</a>
</#if> </#if>
</li> </li>
<li>
<strong>本文链接:</strong>
${config.siteUrl}/article/${article.id?c}
</li>
<li> <li>
<strong>版权声明:</strong> <strong>版权声明:</strong>
<#if article.original?string('true','false') == 'true'> <#if article.original?string('true','false') == 'true'>
站原创文章,于${article.createTime?string('yyyy年MM月dd日')}由<a href="${config.siteUrl}" target="_blank" data-original-title="${config.siteName}" data-toggle="tooltip" data-placement="bottom"><strong>${config.authorName}</strong></a>发布,转载请注明出处 文由<a href="${config.siteUrl}" target="_blank" data-original-title="${config.siteName}" data-toggle="tooltip" data-placement="bottom"><strong>${config.authorName}</strong></a>原创发布,转载请遵循《<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh" target="_blank" rel="nofollow">署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)</a>》许可协议授权
<#else> <#else>
本文为互联网转载文章,出处已在文章中说明(部分除外)。如果侵权,请<a target="_blank" href="mailto:${config.authorEmail}" title="点击给我发邮件" data-toggle="tooltip" data-placement="bottom"><strong>联系本站长</strong></a>删除,谢谢。 本文为互联网转载文章,出处已在文章中说明(部分除外)。如果侵权,请<a target="_blank" href="mailto:${config.authorEmail}" title="点击给我发邮件" data-toggle="tooltip" data-placement="bottom"><strong>联系本站长</strong></a>删除,谢谢。
</#if> </#if>
...@@ -103,7 +126,7 @@ ...@@ -103,7 +126,7 @@
</div> </div>
</div> </div>
<#-- 广告位 --> <#-- 广告位 -->
<div class="blog-body ad-mark" id="ARTICLE_BOTTOM" style="display: none"></div> <div class="ad-mark" id="ARTICLE_BOTTOM" style="display: none"></div>
<div class="blog-body prev-next"> <div class="blog-body prev-next">
<nav class="nav-single wow" data-wow-delay="0.3s"> <nav class="nav-single wow" data-wow-delay="0.3s">
<#if other.prev> <#if other.prev>
...@@ -197,16 +220,18 @@ ...@@ -197,16 +220,18 @@
<div class="clear"></div> <div class="clear"></div>
</div> </div>
<#-- 广告位 --> <#-- 广告位 -->
<div class="blog-body ad-mark" id="COMMENT_BOX_TOP" style="display: none"></div> <div class="ad-mark" id="COMMENT_BOX_TOP" style="display: none"></div>
<#--评论--> <#if !article.requiredAuth>
<#if article.comment> <#--评论-->
<div class="blog-body clear overflow-initial expansion"> <#if article.comment>
<div id="comment-box" data-id="${article.id?c}"></div> <div class="blog-body clear overflow-initial expansion">
</div> <div id="comment-box" data-id="${article.id?c}"></div>
<#else> </div>
<div class="blog-body clear overflow-initial expansion gray"> <#else>
<i class="fa fa-close fa-fw"></i>该篇文章的评论功能已被站长关闭 <div class="blog-body clear overflow-initial expansion gray">
</div> <i class="fa fa-close fa-fw"></i>该篇文章的评论功能已被站长关闭
</div>
</#if>
</#if> </#if>
</div> </div>
<#include "layout/sidebar.ftl"/> <#include "layout/sidebar.ftl"/>
...@@ -239,7 +264,9 @@ ...@@ -239,7 +264,9 @@
var coverImg = $("#cover-img").attr("src") || "${config.staticWebSite}/img/default.png"; var coverImg = $("#cover-img").attr("src") || "${config.staticWebSite}/img/default.png";
window._bd_share_config={"common":{"bdSnsKey":{},"bdText":bdText,"bdMini":"2","bdMiniList":["mshare","qzone","tsina","bdysc","weixin","renren","tqq","kaixin001","tqf","tieba","douban","bdhome","sqq","youdao","sdo","qingbiji","mail","isohu","ty","fbook","twi","linkedin","h163","evernotecn","copy","print"],"bdPic":coverImg,"bdStyle":"1","bdSize":"24"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)]; window._bd_share_config={"common":{"bdSnsKey":{},"bdText":bdText,"bdMini":"2","bdMiniList":["mshare","qzone","tsina","bdysc","weixin","renren","tqq","kaixin001","tqf","tieba","douban","bdhome","sqq","youdao","sdo","qingbiji","mail","isohu","ty","fbook","twi","linkedin","h163","evernotecn","copy","print"],"bdPic":coverImg,"bdStyle":"1","bdSize":"24"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
</script> </script>
<script src="https://v1.hitokoto.cn/?encode=js&c=i&select=%23hitokoto" defer></script> <#if (config.enableHitokoto == 1 || config.enableHitokoto == "1")>
<script src="https://v1.hitokoto.cn/?encode=js&c=i&select=.hitokoto" defer></script>
</#if>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/highlight.js@9.12.0/lib/highlight.min.js"></script> <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/highlight.js@9.12.0/lib/highlight.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/simplemde@1.11.2/dist/simplemde.min.js"></script> <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/simplemde@1.11.2/dist/simplemde.min.js"></script>
......
...@@ -34,9 +34,11 @@ ...@@ -34,9 +34,11 @@
</ul> </ul>
</#if> </#if>
</div> </div>
<div class="article-footer overflow-initial"> <#if (config.enableHitokoto == 1 || config.enableHitokoto == "1")>
<span class="blog-description hitokoto num"></span> <div class="article-footer overflow-initial">
</div> <span class="blog-description hitokoto num"></span>
</div>
</#if>
</div> </div>
</div> </div>
</div> </div>
...@@ -44,6 +46,8 @@ ...@@ -44,6 +46,8 @@
</div> </div>
</div> </div>
<@footer> <@footer>
<script src="https://v1.hitokoto.cn/?encode=js&c=i&select=.hitokoto" defer></script> <#if (config.enableHitokoto == 1 || config.enableHitokoto == "1")>
<script src="https://v1.hitokoto.cn/?encode=js&c=i&select=.hitokoto" defer></script>
</#if>
</@footer> </@footer>
</@compress> </@compress>
...@@ -45,9 +45,7 @@ ...@@ -45,9 +45,7 @@
</div> </div>
</#if> </#if>
<#-- 广告位 --> <#-- 广告位 -->
<div class="col-sm-12 blog-main"> <div class="col-sm-12 ad-mark" id="COMMENT_BOX_TOP" style="display: none"></div>
<div class="blog-body ad-mark" id="COMMENT_BOX_TOP" style="display: none"></div>
</div>
<#if config.comment! && config.comment == 1> <#if config.comment! && config.comment == 1>
<div class="col-sm-12 blog-main"> <div class="col-sm-12 blog-main">
<div class="blog-body expansion"> <div class="blog-body expansion">
...@@ -63,7 +61,9 @@ ...@@ -63,7 +61,9 @@
</div> </div>
<@footer> <@footer>
<script src="https://v1.hitokoto.cn/?encode=js&c=i&select=%23hitokoto" defer></script> <#if (config.enableHitokoto == 1 || config.enableHitokoto == "1")>
<script src="https://v1.hitokoto.cn/?encode=js&c=i&select=.hitokoto" defer></script>
</#if>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/highlight.js@9.12.0/lib/highlight.min.js"></script> <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/highlight.js@9.12.0/lib/highlight.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/simplemde@1.11.2/dist/simplemde.min.js"></script> <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/simplemde@1.11.2/dist/simplemde.min.js"></script>
......
...@@ -67,7 +67,9 @@ ...@@ -67,7 +67,9 @@
<div class="col-sm-12 blog-main"> <div class="col-sm-12 blog-main">
<div class="blog-header"> <div class="blog-header">
<h4>${title}</h4> <h4>${title}</h4>
<p class="blog-description" id="hitokoto"></p> <#if (config.enableHitokoto == 1 || config.enableHitokoto == "1")>
<p class="blog-description hitokoto"></p>
</#if>
<div> <div>
<a href="javascript:void(0);" target="_blank" title="点击QQ联系我" onclick="window.open('tencent://message/?uin=${config.qq}&amp;Site=www.${config.domain}&amp;Menu=yes')" rel="external nofollow"><i class="fa fa fa-qq fa-fw"></i>QQ联系</a> <a href="javascript:void(0);" target="_blank" title="点击QQ联系我" onclick="window.open('tencent://message/?uin=${config.qq}&amp;Site=www.${config.domain}&amp;Menu=yes')" rel="external nofollow"><i class="fa fa fa-qq fa-fw"></i>QQ联系</a>
| |
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
</@header> </@header>
<div class="container custome-container"> <div class="container custome-container">
<#-- 广告位 -->
<div class="ad-mark" id="HOMEPAGE_TOP" style="display: none;margin-bottom: 10px"></div>
<@prompt></@prompt> <@prompt></@prompt>
<nav class="breadcrumb"> <nav class="breadcrumb">
<div class="notify"><i class="fa fa-bullhorn fa-fw"></i></div> <div class="notify"><i class="fa fa-bullhorn fa-fw"></i></div>
...@@ -59,6 +61,28 @@ ...@@ -59,6 +61,28 @@
</div> </div>
</#if> </#if>
</@articleTag> </@articleTag>
<@zhydTag method="scrollmenus" position="scrollmenu">
<#if scrollmenus?? && scrollmenus?size gt 0>
<div class="blog-body expansion" style="padding: 0;">
<div class="scrollmenu nav-tags">
<span>更多分类:</span>
<#list scrollmenus as item>
<a href="/type/${item.id?c}" id="scrollmenu-${item.id?c}"><i class="${item.icon!}"></i>${item.name!}</a>
</#list>
</div>
</div>
</#if>
</@zhydTag>
<#-- <div class="separateline"><span>以下为最新文章</span></div>-->
<#-- <div class="blog-body expansion" style="padding: 0;margin-bottom: 0;border-bottom: 1px solid #eeeeee;">
<div class="scrollmenu nav-tags">
<a href="/type/1" id="scrollmenu-1" class="red" style="color: red">最新文章</a>
<a href="/type/1" id="scrollmenu-1">置顶文章</a>
<a href="/type/1" id="scrollmenu-1">热门文章</a>
<a href="/type/1" id="scrollmenu-1">评论最多</a>
<a href="/type/1" id="scrollmenu-1">点赞最多</a>
</div>
</div>-->
<#if page.list?? && (page.list?size > 0)> <#if page.list?? && (page.list?size > 0)>
<#list page.list as item> <#list page.list as item>
<article class="fade-in"> <article class="fade-in">
...@@ -157,5 +181,13 @@ ...@@ -157,5 +181,13 @@
</div> </div>
</div> </div>
</div> </div>
<@footer></@footer> <@footer>
<script>
var typeMatch = location.href.match(/\/type\/([0-9]+)/);
if(null != typeMatch) {
var typeId = typeMatch[1];
$("#scrollmenu-" + typeId).addClass("active").attr("href", "javascript:void(0)");
}
</script>
</@footer>
</@compress> </@compress>
<div class="col-sm-3 blog-sidebar"> <div class="col-sm-3 blog-sidebar">
<#-- 广告位 --> <#-- 广告位 -->
<div class="sidebar-module ad-mark" id="SIDEBAR_TOP" style="display: none"></div> <div class="ad-mark" id="SIDEBAR_TOP" style="display: none"></div>
<#if articleDetail??> <#if articleDetail?? && (config.enableHitokoto == 1 || config.enableHitokoto == "1")>
<div class="sidebar-module"> <div class="sidebar-module">
<h5 class="custom-title"><i class="fa fa-hand-peace-o fa-fw icon"></i><strong>说给你听</strong><small></small></h5> <h5 class="custom-title"><i class="fa fa-hand-peace-o fa-fw icon"></i><strong>说给你听</strong><small></small></h5>
<div class="div-quote"> <div class="div-quote">
<i class="fa fa-quote-left fa-fw"></i><p id="hitokoto" style="margin-left: 15px;"></p> <i class="fa fa-quote-left fa-fw"></i><p class="hitokoto" style="margin-left: 15px;"></p>
</div> </div>
</div> </div>
<#else> <#else>
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
</#if> </#if>
</@zhydTag> </@zhydTag>
</div> </div>
<@zhydTag method="recentComments" pageSize="10"> <@zhydTag method="recentComments" pageSize="5">
<#if recentComments?? && recentComments?size gt 0> <#if recentComments?? && recentComments?size gt 0>
<div class="sidebar-module"> <div class="sidebar-module">
<h5 class="custom-title"><i class="fa fa-comments fa-fw icon"></i><strong>近期评论</strong><small></small></h5> <h5 class="custom-title"><i class="fa fa-comments fa-fw icon"></i><strong>近期评论</strong><small></small></h5>
...@@ -181,5 +181,5 @@ ...@@ -181,5 +181,5 @@
</ul> </ul>
</div> </div>
<#-- 广告位 --> <#-- 广告位 -->
<div class="sidebar-module ad-mark" id="SIDEBAR_BOTTOM" style="display: none"></div> <div class="ad-mark" id="SIDEBAR_BOTTOM" style="display: none"></div>
</div> </div>
...@@ -245,6 +245,8 @@ ...@@ -245,6 +245,8 @@
}) })
}); });
</script> </script>
<script src="https://v1.hitokoto.cn/?encode=js&c=i&select=%23hitokoto" defer></script> <#if (config.enableHitokoto == 1 || config.enableHitokoto == "1")>
<script src="https://v1.hitokoto.cn/?encode=js&c=i&select=.hitokoto" defer></script>
</#if>
</@footer> </@footer>
</@compress> </@compress>
...@@ -39,3 +39,9 @@ ALTER TABLE `dblog`.`biz_article` ADD COLUMN `editor_type` varchar(10) NULL COMM ...@@ -39,3 +39,9 @@ ALTER TABLE `dblog`.`biz_article` ADD COLUMN `editor_type` varchar(10) NULL COMM
# 修改旧文章的编辑器类型 # 修改旧文章的编辑器类型
UPDATE `dblog`.`biz_article` SET `editor_type` = 'we' WHERE is_markdown is null || is_markdown = 0; UPDATE `dblog`.`biz_article` SET `editor_type` = 'we' WHERE is_markdown is null || is_markdown = 0;
UPDATE `dblog`.`biz_article` SET `editor_type` = 'md' WHERE is_markdown = 1; UPDATE `dblog`.`biz_article` SET `editor_type` = 'md' WHERE is_markdown = 1;
# 20211101
ALTER TABLE `dblog`.`biz_article` ADD COLUMN `required_auth` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT '该文章是否登录后才可访问' AFTER `password`;
ALTER TABLE `dblog`.`biz_type` ADD COLUMN `position` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '分类在web端显示的位置,可选:nav、scrollmenu' AFTER `icon`;
UPDATE `dblog`.`biz_type` SET `position` = 'nav';
...@@ -37,6 +37,10 @@ ONEBLOG_MAIL_PASSWORD= ...@@ -37,6 +37,10 @@ ONEBLOG_MAIL_PASSWORD=
# oneblog 自定义配置 # oneblog 自定义配置
# 是否启用 kaptcha 验证码 # 是否启用 kaptcha 验证码
ONEBLOG_APP_ENABLE_KAPTCHA=false ONEBLOG_APP_ENABLE_KAPTCHA=false
# 是否启用自动校验友情链接的功能
# 请选择打开,一旦打开,每晚凌晨12点会自动检查友联,对于不包含本站链接的网站实行自动封禁
# 目前暂时没实现白名单的功能
ONEBLOG_APP_ENABLE_CHECK_LINK=false
# 启用后,项目在启动时会打印数据库(Mysql和Redis)链接信息(包含密码) # 启用后,项目在启动时会打印数据库(Mysql和Redis)链接信息(包含密码)
ONEBLOG_APP_ENABLE_PRINT_CONFIG=true ONEBLOG_APP_ENABLE_PRINT_CONFIG=true
# 是否启用 redis 切面缓存。 # 是否启用 redis 切面缓存。
......
...@@ -43,6 +43,7 @@ CREATE TABLE `biz_article` ( ...@@ -43,6 +43,7 @@ CREATE TABLE `biz_article` (
`keywords` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '文章关键字,优化搜索', `keywords` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '文章关键字,优化搜索',
`comment` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '是否开启评论', `comment` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '是否开启评论',
`password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '文章私密访问时的密钥', `password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '文章私密访问时的密钥',
`required_auth` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT '该文章是否登录后才可访问',
`create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间', `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
`update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', `update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE PRIMARY KEY (`id`) USING BTREE
...@@ -147,6 +148,7 @@ CREATE TABLE `biz_type` ( ...@@ -147,6 +148,7 @@ CREATE TABLE `biz_type` (
`description` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类型介绍', `description` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类型介绍',
`sort` int(10) NULL DEFAULT NULL COMMENT '排序', `sort` int(10) NULL DEFAULT NULL COMMENT '排序',
`icon` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图标', `icon` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图标',
`position` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '分类在web端显示的位置,可选:nav、scrollmenu',
`available` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '是否可用', `available` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '是否可用',
`create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间', `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
`update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', `update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
# 清空文章表 # 清空文章表
TRUNCATE TABLE `dblog`.`biz_article`; TRUNCATE TABLE `dblog`.`biz_article`;
# 初始化文章 # 初始化文章
INSERT INTO `dblog`.`biz_article` VALUES ('1', 'OneBlog简介', '1', 'zhyd/cover/20180613092017699.jpg', 'md', null, '1', '<h1 id=\"dblog-\">OneBlog简介</h1>\r\n<p>OneBlog是一款简洁美观、自适应的Java博客系统。使用springboot开发,前端使用Bootstrap。支持移动端自适应,配有完备的前台和后台管理功能。</p>\r\n<p><strong>网站预览</strong> </p>\r\n<p><a href=\"https://docs.zhyd.me\">https://docs.zhyd.me</a> </p>\r\n<p><strong>开源地址</strong> </p>\r\n<ol>\r\n<li><a href=\"https://gitee.com/yadong.zhang/DBlog\">Gitee</a> </li>\r\n<li><a href=\"https://github.com/zhangyd-c/DBlog\">Github</a> </li>\r\n</ol>\r\n<h2 id=\"-\">写在前面的话</h2>\r\n<p>ps: 虽然我知道,大部分人都是来了<strong>直接下载源代码</strong>后就潇洒的离开,并且只有等到下次<strong>突然想到</strong>“我天~~我得去看看OneBlog这烂项目更新新功能了吗”的时候才会重新来到这儿,即使你重新来过,我估计你也只有两个选择: </p>\r\n<p>发现更新代码了 --&gt; 下载源码后重复上面的步骤<br>发现没更新代码 --&gt; 直接关闭浏览器</p>\r\n<p>虽然我知道现实就是如此的残酷,但我还是要以我萤虫之力对各位到来的同仁发出一声诚挚的嘶吼:</p>\r\n<p><strong>如果喜欢,请多多分享!!多多Star!!fork可以,但还是请star一下!!</strong></p>\r\n<h3 id=\"-\">开发环境</h3>\r\n<table>\r\n<thead>\r\n<tr>\r\n<th>工具</th>\r\n<th>版本或描述</th>\r\n</tr>\r\n</thead>\r\n<tbody>\r\n<tr>\r\n<td>OS</td>\r\n<td>Windows 7</td>\r\n</tr>\r\n<tr>\r\n<td>JDK</td>\r\n<td>1.7+</td>\r\n</tr>\r\n<tr>\r\n<td>IDE</td>\r\n<td>IntelliJ IDEA 2017.3</td>\r\n</tr>\r\n<tr>\r\n<td>Maven</td>\r\n<td>3.3.1</td>\r\n</tr>\r\n<tr>\r\n<td>MySQL</td>\r\n<td>5.6.4</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<h3 id=\"-\">模块划分</h3>\r\n<table>\r\n<thead>\r\n<tr>\r\n<th>模块</th>\r\n<th>释义</th>\r\n</tr>\r\n</thead>\r\n<tbody>\r\n<tr>\r\n<td>blog-core</td>\r\n<td>核心业务类模块,提供基本的数据操作、工具处理等</td>\r\n</tr>\r\n<tr>\r\n<td>blog-admin</td>\r\n<td>后台管理模块</td>\r\n</tr>\r\n<tr>\r\n<td>blog-web</td>\r\n<td>前台模块</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<h3 id=\"-\">技术栈</h3>\r\n<ul>\r\n<li>Springboot 1.5.9</li>\r\n<li>Apache Shiro 1.2.2</li>\r\n<li>Logback</li>\r\n<li>Redis</li>\r\n<li>Lombok</li>\r\n<li>Websocket</li>\r\n<li>MySQL、Mybatis、Mapper、Pagehelper</li>\r\n<li>Freemarker</li>\r\n<li>Bootstrap 3.3.0</li>\r\n<li>wangEditor</li>\r\n<li>jQuery 1.11.1、jQuery Lazyload 1.9.7、fancybox、iCheck</li>\r\n<li>阿里云OSS</li>\r\n<li>kaptcha</li>\r\n<li>Qiniu</li>\r\n<li>...</li>\r\n</ul>\r\n<h3 id=\"-\">使用方法</h3>\r\n<ol>\r\n<li>使用IDE导入本项目</li>\r\n<li>新建数据库<code>CREATE DATABASE dblog;</code></li>\r\n<li>导入数据库<code>docs/db/dblog.sql</code></li>\r\n<li>修改(<code>resources/application.yml</code>)配置文件<ol>\r\n<li>数据库链接属性(可搜索<code>datasource</code>或定位到L.19) </li>\r\n<li>redis配置(可搜索<code>redis</code>或定位到L.69)</li>\r\n<li>mail配置(可搜索<code>mail</code>或定位到L.89)</li>\r\n<li>【<a href=\"http://qiniu.com\">七牛云</a>】配置(见sys<em>config表中qiniu</em>*开头的字段)<br>注:因为系统存在redis缓存,如果是第一次使用,可以直接修改sys_config表内容,如果不是第一次用,建议使用admin项目中的<code>系统配置</code>页面修改相关配置内容</li>\r\n</ol>\r\n</li>\r\n<li>运行项目(三种方式)<ol>\r\n<li>项目根目录下执行<code>mvn -X clean package -Dmaven.test.skip=true</code>编译打包,然后执行<code>java -jar target/blog-web.jar</code></li>\r\n<li>项目根目录下执行<code>mvn springboot:run</code></li>\r\n<li>直接运行<code>BlogWebApplication.java</code></li>\r\n</ol>\r\n</li>\r\n<li>浏览器访问<code>http://127.0.0.1:8443</code></li>\r\n</ol>\r\n<p><strong>后台用户</strong></p>\r\n<p><em>超级管理员</em>: 账号:root 密码:123456 (本地测试使用这个账号,admin没设置权限)</p>\r\n<p><em>普通管理员</em>: 账号:admin 密码:123456</p>\r\n<p><em>评论审核管理员</em>: 账号:comment-admin 密码:123456</p>\r\n<p>注:后台用户的创建,尽可能做到<strong>权限最小化</strong></p>\r\n<p>更多详情,请参考【<a href=\"https://docs.zhyd.me\">Wiki</a>】</p>\r\n<h3 id=\"-\">更新日志</h3>\r\n<p>2018-06-10</p>\r\n<p><strong>修改功能:</strong></p>\r\n<p>新增:<br> markdown版的编辑器、评论框<br> 控制文章的评论框是否显示<br> 修改密码功能<br>优化:相关页面进行优化 </p>\r\n<p>2018-06-05</p>\r\n<p><strong>修改功能:</strong></p>\r\n<p>修复: admin用户首页报错的问题 </p>\r\n<p>优化:</p>\r\n<ol>\r\n<li>ROOT用户默认拥有所有权限</li>\r\n<li>admin页面改为macro引用的方式</li>\r\n<li>登录界面</li>\r\n<li>日志记录</li>\r\n</ol>\r\n<p>2018-05-25</p>\r\n<p><strong>修改功能:</strong></p>\r\n<ol>\r\n<li>修复后台标签等分页失败的问题</li>\r\n<li>修复前台自动申请友链失败的问题</li>\r\n<li>其他一些问题</li>\r\n</ol>\r\n<p>2018-05-22</p>\r\n<p><strong>修改功能:</strong></p>\r\n<ol>\r\n<li>完善shiro权限(数据库、页面)。注:需要重新执行下<code>sys_resources</code>和<code>sys_role_resources</code>两张表的<code>insert</code>语句</li>\r\n<li>redis配置默认不含密码(鉴于大多数朋友的redis都没有密码做此修改,不过本人 <strong>强烈建议</strong>设置下密码)</li>\r\n</ol>\r\n<p>2018-05-18</p>\r\n<p><strong>修复bug:</strong></p>\r\n<ol>\r\n<li>web端自动申请友链后不显示的问题</li>\r\n<li>config表修改后不能实时刷新的问题</li>\r\n</ol>\r\n<p><strong>增加功能:</strong></p>\r\n<ol>\r\n<li>网站赞赏码</li>\r\n<li>百度推送功能(链接提交到百度站长平台)</li>\r\n</ol>\r\n<p><strong>修改功能:</strong></p>\r\n<ol>\r\n<li>百度api的ak和百度推送的token以及七牛云的配置改为通过config表管理</li>\r\n<li>admin模块菜单通过标签实时获取</li>\r\n<li>弹窗工具类js结构调整</li>\r\n</ol>\r\n<p>你能看到这儿已经很不容易了,剩下的自己先摸索摸索吧,实在不行,加QQ群<a href=\"http://shang.qq.com/wpa/qunwpa?idkey=9f986e9b33b1de953e1ef9a96cdeec990affd0ac7855e00ff103514de2027b60\">190886500</a>,进群可以选择性的备注:<del>欧巴群主我爱你</del>(咳咳,鉴于部分群友的抗议,该备注就不用了),麻烦大家换成:<code>我猜群主一定很帅</code></p>\r\n<h3 id=\"-\">图片预览</h3>\r\n<p><strong>前台页面</strong><br><img src=\"https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/pc-index.png?v=1.0\" alt=\"PC-首页\"><br><img src=\"https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/pc-detail.png?v=1.0\" alt=\"PC-文章详情页\"><br><img src=\"https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/m.png?v=1.0\" alt=\"手机\"><br><strong>后台页面</strong><br><img src=\"https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/admin-index.png?v=1.0\" alt=\"首页\"><br><img src=\"https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/admin-menu.png?v=1.0\" alt=\"菜单\"><br><img src=\"https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/admin-articles.png?v=1.0\" alt=\"文章列表\"><br><img src=\"https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/admin-article2.png?v=1.0\" alt=\"发表文章\"><br><img src=\"https://gitee.com/uploads/images/2018/0610/145228_06541ada_784199.png?v=1.0\" alt=\"markdown版的编辑器\" title=\"markdown版的编辑器\"><br><img src=\"https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/admin-role.png?v=1.0\" alt=\"角色列表\"><br><img src=\"https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/admin-role2.png?v=1.0\" alt=\"角色分配\"></p>\r\n<h3 id=\"-\">生命不息,折腾不止! 更多信息,请关注:</h3>\r\n<ol>\r\n<li><a href=\"https://docs.zhyd.me\">我的博客</a></li>\r\n<li><a href=\"http://weibo.com/211230415\">我的微博</a></li>\r\n<li><a href=\"http://www.toutiao.com/c/user/3286958681/\">我的头条号</a></li>\r\n<li><p><a href=\"http://www.imooc.com/u/1175248/articles\">我的mooc</a></p>\r\n<h3 id=\"-\">有任何问题可以</h3>\r\n<ul>\r\n<li><a href=\"https://docs.zhyd.me/guestbook\">给我留言</a></li>\r\n</ul>\r\n</li>\r\n</ol>\r\n<h3 id=\"-\">开源协议</h3>\r\n<p> <a href=\"https://gitee.com/yadong.zhang/DBlog/blob/master/LICENSE\">MIT</a></p>\r\n', '# OneBlog简介\r\nOneBlog是一款简洁美观、自适应的Java博客系统。使用springboot开发,前端使用Bootstrap。支持移动端自适应,配有完备的前台和后台管理功能。\r\n \r\n**网站预览** \r\n \r\n[https://docs.zhyd.me](https://docs.zhyd.me) \r\n\r\n**开源地址** \r\n1. [Gitee](https://gitee.com/yadong.zhang/DBlog) \r\n2. [Github](https://github.com/zhangyd-c/DBlog) \r\n\r\n## 写在前面的话\r\nps: 虽然我知道,大部分人都是来了**直接下载源代码**后就潇洒的离开,并且只有等到下次**突然想到**“我天~~我得去看看OneBlog这烂项目更新新功能了吗”的时候才会重新来到这儿,即使你重新来过,我估计你也只有两个选择: \r\n\r\n发现更新代码了 --> 下载源码后重复上面的步骤 \r\n发现没更新代码 --> 直接关闭浏览器\r\n\r\n虽然我知道现实就是如此的残酷,但我还是要以我萤虫之力对各位到来的同仁发出一声诚挚的嘶吼:\r\n\r\n**如果喜欢,请多多分享!!多多Star!!fork可以,但还是请star一下!!**\r\n\r\n\r\n### 开发环境\r\n\r\n| 工具 | 版本或描述 |\r\n| ----- | -------------------- |\r\n| OS | Windows 7 |\r\n| JDK | 1.7+ |\r\n| IDE | IntelliJ IDEA 2017.3 |\r\n| Maven | 3.3.1 |\r\n| MySQL | 5.6.4 |\r\n\r\n### 模块划分\r\n\r\n| 模块 | 释义 |\r\n| ---------- | ----------------------- |\r\n| blog-core | 核心业务类模块,提供基本的数据操作、工具处理等 |\r\n| blog-admin | 后台管理模块 |\r\n| blog-web | 前台模块 |\r\n\r\n\r\n### 技术栈\r\n\r\n- Springboot 1.5.9\r\n- Apache Shiro 1.2.2\r\n- Logback\r\n- Redis\r\n- Lombok\r\n- Websocket\r\n- MySQL、Mybatis、Mapper、Pagehelper\r\n- Freemarker\r\n- Bootstrap 3.3.0\r\n- wangEditor\r\n- jQuery 1.11.1、jQuery Lazyload 1.9.7、fancybox、iCheck\r\n- 阿里云OSS\r\n- kaptcha\r\n- Qiniu\r\n- ...\r\n\r\n\r\n### 使用方法\r\n\r\n1. 使用IDE导入本项目\r\n2. 新建数据库`CREATE DATABASE dblog;`\r\n3. 导入数据库`docs/db/dblog.sql`\r\n4. 修改(`resources/application.yml`)配置文件\r\n 1. 数据库链接属性(可搜索`datasource`或定位到L.19) \r\n 2. redis配置(可搜索`redis`或定位到L.69)\r\n 3. mail配置(可搜索`mail`或定位到L.89)\r\n 4. 【[七牛云](http://qiniu.com)】配置(见sys_config表中qiniu_*开头的字段) \r\n 注:因为系统存在redis缓存,如果是第一次使用,可以直接修改sys_config表内容,如果不是第一次用,建议使用admin项目中的`系统配置`页面修改相关配置内容\r\n5. 运行项目(三种方式)\r\n 1. 项目根目录下执行`mvn -X clean package -Dmaven.test.skip=true`编译打包,然后执行`java -jar target/blog-web.jar`\r\n 2. 项目根目录下执行`mvn springboot:run`\r\n 3. 直接运行`BlogWebApplication.java`\r\n6. 浏览器访问`http://127.0.0.1:8443`\r\n\r\n\r\n**后台用户**\r\n\r\n_超级管理员_: 账号:root 密码:123456 (本地测试使用这个账号,admin没设置权限)\r\n\r\n_普通管理员_: 账号:admin 密码:123456\r\n\r\n_评论审核管理员_: 账号:comment-admin 密码:123456\r\n\r\n注:后台用户的创建,尽可能做到**权限最小化**\r\n\r\n更多详情,请参考【[Wiki](https://docs.zhyd.me)】\r\n\r\n### 更新日志\r\n\r\n2018-06-10\r\n\r\n**修改功能:**\r\n\r\n新增: \r\n markdown版的编辑器、评论框 \r\n 控制文章的评论框是否显示 \r\n 修改密码功能 \r\n优化:相关页面进行优化 \r\n\r\n2018-06-05\r\n\r\n**修改功能:**\r\n\r\n修复: admin用户首页报错的问题 \r\n\r\n优化:\r\n1. ROOT用户默认拥有所有权限\r\n2. admin页面改为macro引用的方式\r\n3. 登录界面\r\n4. 日志记录\r\n\r\n2018-05-25\r\n\r\n**修改功能:**\r\n\r\n1. 修复后台标签等分页失败的问题\r\n2. 修复前台自动申请友链失败的问题\r\n3. 其他一些问题\r\n\r\n\r\n2018-05-22\r\n\r\n**修改功能:**\r\n\r\n1. 完善shiro权限(数据库、页面)。注:需要重新执行下`sys_resources`和`sys_role_resources`两张表的`insert`语句\r\n2. redis配置默认不含密码(鉴于大多数朋友的redis都没有密码做此修改,不过本人 **强烈建议**设置下密码)\r\n\r\n2018-05-18\r\n\r\n**修复bug:**\r\n\r\n1. web端自动申请友链后不显示的问题\r\n2. config表修改后不能实时刷新的问题\r\n \r\n**增加功能:**\r\n1. 网站赞赏码\r\n2. 百度推送功能(链接提交到百度站长平台)\r\n \r\n**修改功能:**\r\n1. 百度api的ak和百度推送的token以及七牛云的配置改为通过config表管理\r\n3. admin模块菜单通过标签实时获取\r\n3. 弹窗工具类js结构调整\r\n\r\n你能看到这儿已经很不容易了,剩下的自己先摸索摸索吧,实在不行,加QQ群[190886500](http://shang.qq.com/wpa/qunwpa?idkey=9f986e9b33b1de953e1ef9a96cdeec990affd0ac7855e00ff103514de2027b60),进群可以选择性的备注:~~欧巴群主我爱你~~(咳咳,鉴于部分群友的抗议,该备注就不用了),麻烦大家换成:`我猜群主一定很帅`\r\n\r\n### 图片预览\r\n\r\n**前台页面**\r\n![PC-首页](https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/pc-index.png?v=1.0)\r\n![PC-文章详情页](https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/pc-detail.png?v=1.0)\r\n![手机](https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/m.png?v=1.0)\r\n**后台页面**\r\n![首页](https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/admin-index.png?v=1.0)\r\n![菜单](https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/admin-menu.png?v=1.0)\r\n![文章列表](https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/admin-articles.png?v=1.0)\r\n![发表文章](https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/admin-article2.png?v=1.0)\r\n![markdown版的编辑器](https://gitee.com/uploads/images/2018/0610/145228_06541ada_784199.png?v=1.0 \"markdown版的编辑器\")\r\n![角色列表](https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/admin-role.png?v=1.0)\r\n![角色分配](https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/admin-role2.png?v=1.0)\r\n\r\n\r\n ### 生命不息,折腾不止! 更多信息,请关注:\r\n 1. [我的博客](https://docs.zhyd.me)\r\n 2. [我的微博](http://weibo.com/211230415)\r\n 3. [我的头条号](http://www.toutiao.com/c/user/3286958681/)\r\n 4. [我的mooc](http://www.imooc.com/u/1175248/articles)\r\n\r\n ### 有任何问题可以\r\n- [给我留言](https://docs.zhyd.me/guestbook)\r\n\r\n\r\n### 开源协议\r\n\r\n [MIT](https://gitee.com/yadong.zhang/OneBlog/blob/master/LICENSE)', '0', '3', '1', '0', '1', 'OneBlog是一款简洁美观、自适应的Java博客系统。使用springboot开发,前端使用Bootstrap。支持移动端自适应,配有完备的前台和后台管理功能。', 'OneBlog,开源博客', '1', '', now(), now()); INSERT INTO `dblog`.`biz_article` VALUES ('1', 'OneBlog简介', '1', 'zhyd/cover/20180613092017699.jpg', 'md', null, '1', '<h1 id=\"dblog-\">OneBlog简介</h1>\r\n<p>OneBlog是一款简洁美观、自适应的Java博客系统。使用springboot开发,前端使用Bootstrap。支持移动端自适应,配有完备的前台和后台管理功能。</p>\r\n<p><strong>网站预览</strong> </p>\r\n<p><a href=\"https://docs.zhyd.me\">https://docs.zhyd.me</a> </p>\r\n<p><strong>开源地址</strong> </p>\r\n<ol>\r\n<li><a href=\"https://gitee.com/yadong.zhang/DBlog\">Gitee</a> </li>\r\n<li><a href=\"https://github.com/zhangyd-c/DBlog\">Github</a> </li>\r\n</ol>\r\n<h2 id=\"-\">写在前面的话</h2>\r\n<p>ps: 虽然我知道,大部分人都是来了<strong>直接下载源代码</strong>后就潇洒的离开,并且只有等到下次<strong>突然想到</strong>“我天~~我得去看看OneBlog这烂项目更新新功能了吗”的时候才会重新来到这儿,即使你重新来过,我估计你也只有两个选择: </p>\r\n<p>发现更新代码了 --&gt; 下载源码后重复上面的步骤<br>发现没更新代码 --&gt; 直接关闭浏览器</p>\r\n<p>虽然我知道现实就是如此的残酷,但我还是要以我萤虫之力对各位到来的同仁发出一声诚挚的嘶吼:</p>\r\n<p><strong>如果喜欢,请多多分享!!多多Star!!fork可以,但还是请star一下!!</strong></p>\r\n<h3 id=\"-\">开发环境</h3>\r\n<table>\r\n<thead>\r\n<tr>\r\n<th>工具</th>\r\n<th>版本或描述</th>\r\n</tr>\r\n</thead>\r\n<tbody>\r\n<tr>\r\n<td>OS</td>\r\n<td>Windows 7</td>\r\n</tr>\r\n<tr>\r\n<td>JDK</td>\r\n<td>1.7+</td>\r\n</tr>\r\n<tr>\r\n<td>IDE</td>\r\n<td>IntelliJ IDEA 2017.3</td>\r\n</tr>\r\n<tr>\r\n<td>Maven</td>\r\n<td>3.3.1</td>\r\n</tr>\r\n<tr>\r\n<td>MySQL</td>\r\n<td>5.6.4</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<h3 id=\"-\">模块划分</h3>\r\n<table>\r\n<thead>\r\n<tr>\r\n<th>模块</th>\r\n<th>释义</th>\r\n</tr>\r\n</thead>\r\n<tbody>\r\n<tr>\r\n<td>blog-core</td>\r\n<td>核心业务类模块,提供基本的数据操作、工具处理等</td>\r\n</tr>\r\n<tr>\r\n<td>blog-admin</td>\r\n<td>后台管理模块</td>\r\n</tr>\r\n<tr>\r\n<td>blog-web</td>\r\n<td>前台模块</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<h3 id=\"-\">技术栈</h3>\r\n<ul>\r\n<li>Springboot 1.5.9</li>\r\n<li>Apache Shiro 1.2.2</li>\r\n<li>Logback</li>\r\n<li>Redis</li>\r\n<li>Lombok</li>\r\n<li>Websocket</li>\r\n<li>MySQL、Mybatis、Mapper、Pagehelper</li>\r\n<li>Freemarker</li>\r\n<li>Bootstrap 3.3.0</li>\r\n<li>wangEditor</li>\r\n<li>jQuery 1.11.1、jQuery Lazyload 1.9.7、fancybox、iCheck</li>\r\n<li>阿里云OSS</li>\r\n<li>kaptcha</li>\r\n<li>Qiniu</li>\r\n<li>...</li>\r\n</ul>\r\n<h3 id=\"-\">使用方法</h3>\r\n<ol>\r\n<li>使用IDE导入本项目</li>\r\n<li>新建数据库<code>CREATE DATABASE dblog;</code></li>\r\n<li>导入数据库<code>docs/db/dblog.sql</code></li>\r\n<li>修改(<code>resources/application.yml</code>)配置文件<ol>\r\n<li>数据库链接属性(可搜索<code>datasource</code>或定位到L.19) </li>\r\n<li>redis配置(可搜索<code>redis</code>或定位到L.69)</li>\r\n<li>mail配置(可搜索<code>mail</code>或定位到L.89)</li>\r\n<li>【<a href=\"http://qiniu.com\">七牛云</a>】配置(见sys<em>config表中qiniu</em>*开头的字段)<br>注:因为系统存在redis缓存,如果是第一次使用,可以直接修改sys_config表内容,如果不是第一次用,建议使用admin项目中的<code>系统配置</code>页面修改相关配置内容</li>\r\n</ol>\r\n</li>\r\n<li>运行项目(三种方式)<ol>\r\n<li>项目根目录下执行<code>mvn -X clean package -Dmaven.test.skip=true</code>编译打包,然后执行<code>java -jar target/blog-web.jar</code></li>\r\n<li>项目根目录下执行<code>mvn springboot:run</code></li>\r\n<li>直接运行<code>BlogWebApplication.java</code></li>\r\n</ol>\r\n</li>\r\n<li>浏览器访问<code>http://127.0.0.1:8443</code></li>\r\n</ol>\r\n<p><strong>后台用户</strong></p>\r\n<p><em>超级管理员</em>: 账号:root 密码:123456 (本地测试使用这个账号,admin没设置权限)</p>\r\n<p><em>普通管理员</em>: 账号:admin 密码:123456</p>\r\n<p><em>评论审核管理员</em>: 账号:comment-admin 密码:123456</p>\r\n<p>注:后台用户的创建,尽可能做到<strong>权限最小化</strong></p>\r\n<p>更多详情,请参考【<a href=\"https://docs.zhyd.me\">Wiki</a>】</p>\r\n<h3 id=\"-\">更新日志</h3>\r\n<p>2018-06-10</p>\r\n<p><strong>修改功能:</strong></p>\r\n<p>新增:<br> markdown版的编辑器、评论框<br> 控制文章的评论框是否显示<br> 修改密码功能<br>优化:相关页面进行优化 </p>\r\n<p>2018-06-05</p>\r\n<p><strong>修改功能:</strong></p>\r\n<p>修复: admin用户首页报错的问题 </p>\r\n<p>优化:</p>\r\n<ol>\r\n<li>ROOT用户默认拥有所有权限</li>\r\n<li>admin页面改为macro引用的方式</li>\r\n<li>登录界面</li>\r\n<li>日志记录</li>\r\n</ol>\r\n<p>2018-05-25</p>\r\n<p><strong>修改功能:</strong></p>\r\n<ol>\r\n<li>修复后台标签等分页失败的问题</li>\r\n<li>修复前台自动申请友链失败的问题</li>\r\n<li>其他一些问题</li>\r\n</ol>\r\n<p>2018-05-22</p>\r\n<p><strong>修改功能:</strong></p>\r\n<ol>\r\n<li>完善shiro权限(数据库、页面)。注:需要重新执行下<code>sys_resources</code>和<code>sys_role_resources</code>两张表的<code>insert</code>语句</li>\r\n<li>redis配置默认不含密码(鉴于大多数朋友的redis都没有密码做此修改,不过本人 <strong>强烈建议</strong>设置下密码)</li>\r\n</ol>\r\n<p>2018-05-18</p>\r\n<p><strong>修复bug:</strong></p>\r\n<ol>\r\n<li>web端自动申请友链后不显示的问题</li>\r\n<li>config表修改后不能实时刷新的问题</li>\r\n</ol>\r\n<p><strong>增加功能:</strong></p>\r\n<ol>\r\n<li>网站赞赏码</li>\r\n<li>百度推送功能(链接提交到百度站长平台)</li>\r\n</ol>\r\n<p><strong>修改功能:</strong></p>\r\n<ol>\r\n<li>百度api的ak和百度推送的token以及七牛云的配置改为通过config表管理</li>\r\n<li>admin模块菜单通过标签实时获取</li>\r\n<li>弹窗工具类js结构调整</li>\r\n</ol>\r\n<p>你能看到这儿已经很不容易了,剩下的自己先摸索摸索吧,实在不行,加QQ群<a href=\"http://shang.qq.com/wpa/qunwpa?idkey=9f986e9b33b1de953e1ef9a96cdeec990affd0ac7855e00ff103514de2027b60\">190886500</a>,进群可以选择性的备注:<del>欧巴群主我爱你</del>(咳咳,鉴于部分群友的抗议,该备注就不用了),麻烦大家换成:<code>我猜群主一定很帅</code></p>\r\n<h3 id=\"-\">图片预览</h3>\r\n<p><strong>前台页面</strong><br><img src=\"https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/pc-index.png?v=1.0\" alt=\"PC-首页\"><br><img src=\"https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/pc-detail.png?v=1.0\" alt=\"PC-文章详情页\"><br><img src=\"https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/m.png?v=1.0\" alt=\"手机\"><br><strong>后台页面</strong><br><img src=\"https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/admin-index.png?v=1.0\" alt=\"首页\"><br><img src=\"https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/admin-menu.png?v=1.0\" alt=\"菜单\"><br><img src=\"https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/admin-articles.png?v=1.0\" alt=\"文章列表\"><br><img src=\"https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/admin-article2.png?v=1.0\" alt=\"发表文章\"><br><img src=\"https://gitee.com/uploads/images/2018/0610/145228_06541ada_784199.png?v=1.0\" alt=\"markdown版的编辑器\" title=\"markdown版的编辑器\"><br><img src=\"https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/admin-role.png?v=1.0\" alt=\"角色列表\"><br><img src=\"https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/admin-role2.png?v=1.0\" alt=\"角色分配\"></p>\r\n<h3 id=\"-\">生命不息,折腾不止! 更多信息,请关注:</h3>\r\n<ol>\r\n<li><a href=\"https://docs.zhyd.me\">我的博客</a></li>\r\n<li><a href=\"http://weibo.com/211230415\">我的微博</a></li>\r\n<li><a href=\"http://www.toutiao.com/c/user/3286958681/\">我的头条号</a></li>\r\n<li><p><a href=\"http://www.imooc.com/u/1175248/articles\">我的mooc</a></p>\r\n<h3 id=\"-\">有任何问题可以</h3>\r\n<ul>\r\n<li><a href=\"https://docs.zhyd.me/guestbook\">给我留言</a></li>\r\n</ul>\r\n</li>\r\n</ol>\r\n<h3 id=\"-\">开源协议</h3>\r\n<p> <a href=\"https://gitee.com/yadong.zhang/DBlog/blob/master/LICENSE\">MIT</a></p>\r\n', '# OneBlog简介\r\nOneBlog是一款简洁美观、自适应的Java博客系统。使用springboot开发,前端使用Bootstrap。支持移动端自适应,配有完备的前台和后台管理功能。\r\n \r\n**网站预览** \r\n \r\n[https://docs.zhyd.me](https://docs.zhyd.me) \r\n\r\n**开源地址** \r\n1. [Gitee](https://gitee.com/yadong.zhang/DBlog) \r\n2. [Github](https://github.com/zhangyd-c/DBlog) \r\n\r\n## 写在前面的话\r\nps: 虽然我知道,大部分人都是来了**直接下载源代码**后就潇洒的离开,并且只有等到下次**突然想到**“我天~~我得去看看OneBlog这烂项目更新新功能了吗”的时候才会重新来到这儿,即使你重新来过,我估计你也只有两个选择: \r\n\r\n发现更新代码了 --> 下载源码后重复上面的步骤 \r\n发现没更新代码 --> 直接关闭浏览器\r\n\r\n虽然我知道现实就是如此的残酷,但我还是要以我萤虫之力对各位到来的同仁发出一声诚挚的嘶吼:\r\n\r\n**如果喜欢,请多多分享!!多多Star!!fork可以,但还是请star一下!!**\r\n\r\n\r\n### 开发环境\r\n\r\n| 工具 | 版本或描述 |\r\n| ----- | -------------------- |\r\n| OS | Windows 7 |\r\n| JDK | 1.7+ |\r\n| IDE | IntelliJ IDEA 2017.3 |\r\n| Maven | 3.3.1 |\r\n| MySQL | 5.6.4 |\r\n\r\n### 模块划分\r\n\r\n| 模块 | 释义 |\r\n| ---------- | ----------------------- |\r\n| blog-core | 核心业务类模块,提供基本的数据操作、工具处理等 |\r\n| blog-admin | 后台管理模块 |\r\n| blog-web | 前台模块 |\r\n\r\n\r\n### 技术栈\r\n\r\n- Springboot 1.5.9\r\n- Apache Shiro 1.2.2\r\n- Logback\r\n- Redis\r\n- Lombok\r\n- Websocket\r\n- MySQL、Mybatis、Mapper、Pagehelper\r\n- Freemarker\r\n- Bootstrap 3.3.0\r\n- wangEditor\r\n- jQuery 1.11.1、jQuery Lazyload 1.9.7、fancybox、iCheck\r\n- 阿里云OSS\r\n- kaptcha\r\n- Qiniu\r\n- ...\r\n\r\n\r\n### 使用方法\r\n\r\n1. 使用IDE导入本项目\r\n2. 新建数据库`CREATE DATABASE dblog;`\r\n3. 导入数据库`docs/db/dblog.sql`\r\n4. 修改(`resources/application.yml`)配置文件\r\n 1. 数据库链接属性(可搜索`datasource`或定位到L.19) \r\n 2. redis配置(可搜索`redis`或定位到L.69)\r\n 3. mail配置(可搜索`mail`或定位到L.89)\r\n 4. 【[七牛云](http://qiniu.com)】配置(见sys_config表中qiniu_*开头的字段) \r\n 注:因为系统存在redis缓存,如果是第一次使用,可以直接修改sys_config表内容,如果不是第一次用,建议使用admin项目中的`系统配置`页面修改相关配置内容\r\n5. 运行项目(三种方式)\r\n 1. 项目根目录下执行`mvn -X clean package -Dmaven.test.skip=true`编译打包,然后执行`java -jar target/blog-web.jar`\r\n 2. 项目根目录下执行`mvn springboot:run`\r\n 3. 直接运行`BlogWebApplication.java`\r\n6. 浏览器访问`http://127.0.0.1:8443`\r\n\r\n\r\n**后台用户**\r\n\r\n_超级管理员_: 账号:root 密码:123456 (本地测试使用这个账号,admin没设置权限)\r\n\r\n_普通管理员_: 账号:admin 密码:123456\r\n\r\n_评论审核管理员_: 账号:comment-admin 密码:123456\r\n\r\n注:后台用户的创建,尽可能做到**权限最小化**\r\n\r\n更多详情,请参考【[Wiki](https://docs.zhyd.me)】\r\n\r\n### 更新日志\r\n\r\n2018-06-10\r\n\r\n**修改功能:**\r\n\r\n新增: \r\n markdown版的编辑器、评论框 \r\n 控制文章的评论框是否显示 \r\n 修改密码功能 \r\n优化:相关页面进行优化 \r\n\r\n2018-06-05\r\n\r\n**修改功能:**\r\n\r\n修复: admin用户首页报错的问题 \r\n\r\n优化:\r\n1. ROOT用户默认拥有所有权限\r\n2. admin页面改为macro引用的方式\r\n3. 登录界面\r\n4. 日志记录\r\n\r\n2018-05-25\r\n\r\n**修改功能:**\r\n\r\n1. 修复后台标签等分页失败的问题\r\n2. 修复前台自动申请友链失败的问题\r\n3. 其他一些问题\r\n\r\n\r\n2018-05-22\r\n\r\n**修改功能:**\r\n\r\n1. 完善shiro权限(数据库、页面)。注:需要重新执行下`sys_resources`和`sys_role_resources`两张表的`insert`语句\r\n2. redis配置默认不含密码(鉴于大多数朋友的redis都没有密码做此修改,不过本人 **强烈建议**设置下密码)\r\n\r\n2018-05-18\r\n\r\n**修复bug:**\r\n\r\n1. web端自动申请友链后不显示的问题\r\n2. config表修改后不能实时刷新的问题\r\n \r\n**增加功能:**\r\n1. 网站赞赏码\r\n2. 百度推送功能(链接提交到百度站长平台)\r\n \r\n**修改功能:**\r\n1. 百度api的ak和百度推送的token以及七牛云的配置改为通过config表管理\r\n3. admin模块菜单通过标签实时获取\r\n3. 弹窗工具类js结构调整\r\n\r\n你能看到这儿已经很不容易了,剩下的自己先摸索摸索吧,实在不行,加QQ群[190886500](http://shang.qq.com/wpa/qunwpa?idkey=9f986e9b33b1de953e1ef9a96cdeec990affd0ac7855e00ff103514de2027b60),进群可以选择性的备注:~~欧巴群主我爱你~~(咳咳,鉴于部分群友的抗议,该备注就不用了),麻烦大家换成:`我猜群主一定很帅`\r\n\r\n### 图片预览\r\n\r\n**前台页面**\r\n![PC-首页](https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/pc-index.png?v=1.0)\r\n![PC-文章详情页](https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/pc-detail.png?v=1.0)\r\n![手机](https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/m.png?v=1.0)\r\n**后台页面**\r\n![首页](https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/admin-index.png?v=1.0)\r\n![菜单](https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/admin-menu.png?v=1.0)\r\n![文章列表](https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/admin-articles.png?v=1.0)\r\n![发表文章](https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/admin-article2.png?v=1.0)\r\n![markdown版的编辑器](https://gitee.com/uploads/images/2018/0610/145228_06541ada_784199.png?v=1.0 \"markdown版的编辑器\")\r\n![角色列表](https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/admin-role.png?v=1.0)\r\n![角色分配](https://gitee.com/yadong.zhang/DBlog/raw/master/docs/img/admin-role2.png?v=1.0)\r\n\r\n\r\n ### 生命不息,折腾不止! 更多信息,请关注:\r\n 1. [我的博客](https://docs.zhyd.me)\r\n 2. [我的微博](http://weibo.com/211230415)\r\n 3. [我的头条号](http://www.toutiao.com/c/user/3286958681/)\r\n 4. [我的mooc](http://www.imooc.com/u/1175248/articles)\r\n\r\n ### 有任何问题可以\r\n- [给我留言](https://docs.zhyd.me/guestbook)\r\n\r\n\r\n### 开源协议\r\n\r\n [MIT](https://gitee.com/yadong.zhang/OneBlog/blob/master/LICENSE)', '0', '3', '1', '0', '1', 'OneBlog是一款简洁美观、自适应的Java博客系统。使用springboot开发,前端使用Bootstrap。支持移动端自适应,配有完备的前台和后台管理功能。', 'OneBlog,开源博客', '1', '', '0', now(), now());
INSERT INTO `dblog`.`biz_article` VALUES ('2', 'OneBlog简介(未开启评论)', '1', 'zhyd/cover/20180613092017699.jpg', 'md', null, '1', '<h1 id=\"dblog-\">OneBlog简介</h1>\n<p>OneBlog是一款简洁美观、自适应的Java博客系统。使用springboot开发,前端使用Bootstrap。支持移动端自适应,配有完备的前台和后台管理功能。</p>\n<p><strong>网站预览</strong> </p>\n<p><a href=\"https://docs.zhyd.me\">https://docs.zhyd.me</a> </p>\n<p><strong>开源地址</strong> </p>\n<ol>\n<li><a href=\"https://gitee.com/yadong.zhang/DBlog\">Gitee</a> </li>\n<li><a href=\"https://github.com/zhangyd-c/DBlog\">Github</a> </li>\n</ol>\n<h2 id=\"-\">写在前面的话</h2>\n<p>ps: 虽然我知道,大部分人都是来了<strong>直接下载源代码</strong>后就潇洒的离开,并且只有等到下次<strong>突然想到</strong>“我天~~我得去看看OneBlog这烂项目更新新功能了吗”的时候才会重新来到这儿,即使你重新来过,我估计你也只有两个选择: </p>\n<p>发现更新代码了 --&gt; 下载源码后重复上面的步骤<br>发现没更新代码 --&gt; 直接关闭浏览器</p>\n<p>虽然我知道现实就是如此的残酷,但我还是要以我萤虫之力对各位到来的同仁发出一声诚挚的嘶吼:</p>\n<p><strong>如果喜欢,请多多分享!!多多Star!!fork可以,但还是请star一下!!</strong></p>\n<h3 id=\"-\">开发环境</h3>\n<table>\n<thead>\n<tr>\n<th>工具</th>\n<th>版本或描述</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>OS</td>\n<td>Windows 7</td>\n</tr>\n<tr>\n<td>JDK</td>\n<td>1.7+</td>\n</tr>\n<tr>\n<td>IDE</td>\n<td>IntelliJ IDEA 2017.3</td>\n</tr>\n<tr>\n<td>Maven</td>\n<td>3.3.1</td>\n</tr>\n<tr>\n<td>MySQL</td>\n<td>5.6.4</td>\n</tr>\n</tbody>\n</table>\n<h3 id=\"-\">模块划分</h3>\n<table>\n<thead>\n<tr>\n<th>模块</th>\n<th>释义</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>blog-core</td>\n<td>核心业务类模块,提供基本的数据操作、工具处理等</td>\n</tr>\n<tr>\n<td>blog-admin</td>\n<td>后台管理模块</td>\n</tr>\n<tr>\n<td>blog-web</td>\n<td>前台模块</td>\n</tr>\n</tbody>\n</table>\n<h3 id=\"-\">技术栈</h3>\n<ul>\n<li>Springboot 1.5.9</li>\n<li>Apache Shiro 1.2.2</li>\n<li>Logback</li>\n<li>Redis</li>\n<li>Lombok</li>\n<li>Websocket</li>\n<li>MySQL、Mybatis、Mapper、Pagehelper</li>\n<li>Freemarker</li>\n<li>Bootstrap 3.3.0</li>\n<li>wangEditor</li>\n<li>jQuery 1.11.1、jQuery Lazyload 1.9.7、fancybox、iCheck</li>\n<li>阿里云OSS</li>\n<li>kaptcha</li>\n<li>Qiniu</li>\n<li>...</li>\n</ul>\n<h3 id=\"-\">使用方法</h3>\n<ol>\n<li>使用IDE导入本项目</li>\n<li>新建数据库<code>CREATE DATABASE dblog;</code></li>\n<li>导入数据库<code>docs/db/dblog.sql</code></li>\n<li>修改(<code>resources/application.yml</code>)配置文件<ol>\n<li>数据库链接属性(可搜索<code>datasource</code>或定位到L.19) </li>\n<li>redis配置(可搜索<code>redis</code>或定位到L.69)</li>\n<li>mail配置(可搜索<code>mail</code>或定位到L.89)</li>\n<li>【<a href=\"http://qiniu.com\">七牛云</a>】配置(见sys<em>config表中qiniu</em>*开头的字段)<br>注:因为系统存在redis缓存,如果是第一次使用,可以直接修改sys_config表内容,如果不是第一次用,建议使用admin项目中的<code>系统配置</code>页面修改相关配置内容</li>\n</ol>\n</li>\n<li>运行项目(三种方式)<ol>\n<li>项目根目录下执行<code>mvn -X clean package -Dmaven.test.skip=true</code>编译打包,然后执行<code>java -jar target/blog-web.jar</code></li>\n<li>项目根目录下执行<code>mvn springboot:run</code></li>\n<li>直接运行<code>BlogWebApplication.java</code></li>\n</ol>\n</li>\n<li>浏览器访问<code>http://127.0.0.1:8443</code></li>\n</ol>\n<p><strong>后台用户</strong></p>\n<p><em>超级管理员</em>: 账号:root 密码:123456 (本地测试使用这个账号,admin没设置权限)</p>\n<p><em>普通管理员</em>: 账号:admin 密码:123456</p>\n<p><em>评论审核管理员</em>: 账号:comment-admin 密码:123456</p>\n<p>注:后台用户的创建,尽可能做到<strong>权限最小化</strong></p>\n<p>更多详情,请参考【<a href=\"https://docs.zhyd.me\">Wiki</a>】</p>\n', '# OneBlog简介\nDBlog是一款简洁美观、自适应的Java博客系统。使用springboot开发,前端使用Bootstrap。支持移动端自适应,配有完备的前台和后台管理功能。\n \n**网站预览** \n \n[https://docs.zhyd.me](https://docs.zhyd.me) \n\n**开源地址** \n1. [Gitee](https://gitee.com/yadong.zhang/DBlog) \n2. [Github](https://github.com/zhangyd-c/DBlog) \n\n## 写在前面的话\nps: 虽然我知道,大部分人都是来了**直接下载源代码**后就潇洒的离开,并且只有等到下次**突然想到**“我天~~我得去看看OneBlog这烂项目更新新功能了吗”的时候才会重新来到这儿,即使你重新来过,我估计你也只有两个选择: \n\n发现更新代码了 --> 下载源码后重复上面的步骤 \n发现没更新代码 --> 直接关闭浏览器\n\n虽然我知道现实就是如此的残酷,但我还是要以我萤虫之力对各位到来的同仁发出一声诚挚的嘶吼:\n\n**如果喜欢,请多多分享!!多多Star!!fork可以,但还是请star一下!!**\n\n\n### 开发环境\n\n| 工具 | 版本或描述 |\n| ----- | -------------------- |\n| OS | Windows 7 |\n| JDK | 1.7+ |\n| IDE | IntelliJ IDEA 2017.3 |\n| Maven | 3.3.1 |\n| MySQL | 5.6.4 |\n\n### 模块划分\n\n| 模块 | 释义 |\n| ---------- | ----------------------- |\n| blog-core | 核心业务类模块,提供基本的数据操作、工具处理等 |\n| blog-admin | 后台管理模块 |\n| blog-web | 前台模块 |\n\n\n### 技术栈\n\n- Springboot 1.5.9\n- Apache Shiro 1.2.2\n- Logback\n- Redis\n- Lombok\n- Websocket\n- MySQL、Mybatis、Mapper、Pagehelper\n- Freemarker\n- Bootstrap 3.3.0\n- wangEditor\n- jQuery 1.11.1、jQuery Lazyload 1.9.7、fancybox、iCheck\n- 阿里云OSS\n- kaptcha\n- Qiniu\n- ...\n\n\n### 使用方法\n\n1. 使用IDE导入本项目\n2. 新建数据库`CREATE DATABASE dblog;`\n3. 导入数据库`docs/db/dblog.sql`\n4. 修改(`resources/application.yml`)配置文件\n 1. 数据库链接属性(可搜索`datasource`或定位到L.19) \n 2. redis配置(可搜索`redis`或定位到L.69)\n 3. mail配置(可搜索`mail`或定位到L.89)\n 4. 【[七牛云](http://qiniu.com)】配置(见sys_config表中qiniu_*开头的字段) \n 注:因为系统存在redis缓存,如果是第一次使用,可以直接修改sys_config表内容,如果不是第一次用,建议使用admin项目中的`系统配置`页面修改相关配置内容\n5. 运行项目(三种方式)\n 1. 项目根目录下执行`mvn -X clean package -Dmaven.test.skip=true`编译打包,然后执行`java -jar target/blog-web.jar`\n 2. 项目根目录下执行`mvn springboot:run`\n 3. 直接运行`BlogWebApplication.java`\n6. 浏览器访问`http://127.0.0.1:8443`\n\n\n**后台用户**\n\n_超级管理员_: 账号:root 密码:123456 (本地测试使用这个账号,admin没设置权限)\n\n_普通管理员_: 账号:admin 密码:123456\n\n_评论审核管理员_: 账号:comment-admin 密码:123456\n\n注:后台用户的创建,尽可能做到**权限最小化**\n\n更多详情,请参考【[Wiki](https://docs.zhyd.me)】', '0', '3', '1', '0', '1', 'OneBlog是一款简洁美观、自适应的Java博客系统。使用springboot开发,前端使用Bootstrap。支持移动端自适应,配有完备的前台和后台管理功能。', 'OneBlog,开源博客', '0', '', now(), now()); INSERT INTO `dblog`.`biz_article` VALUES ('2', 'OneBlog简介(未开启评论)', '1', 'zhyd/cover/20180613092017699.jpg', 'md', null, '1', '<h1 id=\"dblog-\">OneBlog简介</h1>\n<p>OneBlog是一款简洁美观、自适应的Java博客系统。使用springboot开发,前端使用Bootstrap。支持移动端自适应,配有完备的前台和后台管理功能。</p>\n<p><strong>网站预览</strong> </p>\n<p><a href=\"https://docs.zhyd.me\">https://docs.zhyd.me</a> </p>\n<p><strong>开源地址</strong> </p>\n<ol>\n<li><a href=\"https://gitee.com/yadong.zhang/DBlog\">Gitee</a> </li>\n<li><a href=\"https://github.com/zhangyd-c/DBlog\">Github</a> </li>\n</ol>\n<h2 id=\"-\">写在前面的话</h2>\n<p>ps: 虽然我知道,大部分人都是来了<strong>直接下载源代码</strong>后就潇洒的离开,并且只有等到下次<strong>突然想到</strong>“我天~~我得去看看OneBlog这烂项目更新新功能了吗”的时候才会重新来到这儿,即使你重新来过,我估计你也只有两个选择: </p>\n<p>发现更新代码了 --&gt; 下载源码后重复上面的步骤<br>发现没更新代码 --&gt; 直接关闭浏览器</p>\n<p>虽然我知道现实就是如此的残酷,但我还是要以我萤虫之力对各位到来的同仁发出一声诚挚的嘶吼:</p>\n<p><strong>如果喜欢,请多多分享!!多多Star!!fork可以,但还是请star一下!!</strong></p>\n<h3 id=\"-\">开发环境</h3>\n<table>\n<thead>\n<tr>\n<th>工具</th>\n<th>版本或描述</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>OS</td>\n<td>Windows 7</td>\n</tr>\n<tr>\n<td>JDK</td>\n<td>1.7+</td>\n</tr>\n<tr>\n<td>IDE</td>\n<td>IntelliJ IDEA 2017.3</td>\n</tr>\n<tr>\n<td>Maven</td>\n<td>3.3.1</td>\n</tr>\n<tr>\n<td>MySQL</td>\n<td>5.6.4</td>\n</tr>\n</tbody>\n</table>\n<h3 id=\"-\">模块划分</h3>\n<table>\n<thead>\n<tr>\n<th>模块</th>\n<th>释义</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>blog-core</td>\n<td>核心业务类模块,提供基本的数据操作、工具处理等</td>\n</tr>\n<tr>\n<td>blog-admin</td>\n<td>后台管理模块</td>\n</tr>\n<tr>\n<td>blog-web</td>\n<td>前台模块</td>\n</tr>\n</tbody>\n</table>\n<h3 id=\"-\">技术栈</h3>\n<ul>\n<li>Springboot 1.5.9</li>\n<li>Apache Shiro 1.2.2</li>\n<li>Logback</li>\n<li>Redis</li>\n<li>Lombok</li>\n<li>Websocket</li>\n<li>MySQL、Mybatis、Mapper、Pagehelper</li>\n<li>Freemarker</li>\n<li>Bootstrap 3.3.0</li>\n<li>wangEditor</li>\n<li>jQuery 1.11.1、jQuery Lazyload 1.9.7、fancybox、iCheck</li>\n<li>阿里云OSS</li>\n<li>kaptcha</li>\n<li>Qiniu</li>\n<li>...</li>\n</ul>\n<h3 id=\"-\">使用方法</h3>\n<ol>\n<li>使用IDE导入本项目</li>\n<li>新建数据库<code>CREATE DATABASE dblog;</code></li>\n<li>导入数据库<code>docs/db/dblog.sql</code></li>\n<li>修改(<code>resources/application.yml</code>)配置文件<ol>\n<li>数据库链接属性(可搜索<code>datasource</code>或定位到L.19) </li>\n<li>redis配置(可搜索<code>redis</code>或定位到L.69)</li>\n<li>mail配置(可搜索<code>mail</code>或定位到L.89)</li>\n<li>【<a href=\"http://qiniu.com\">七牛云</a>】配置(见sys<em>config表中qiniu</em>*开头的字段)<br>注:因为系统存在redis缓存,如果是第一次使用,可以直接修改sys_config表内容,如果不是第一次用,建议使用admin项目中的<code>系统配置</code>页面修改相关配置内容</li>\n</ol>\n</li>\n<li>运行项目(三种方式)<ol>\n<li>项目根目录下执行<code>mvn -X clean package -Dmaven.test.skip=true</code>编译打包,然后执行<code>java -jar target/blog-web.jar</code></li>\n<li>项目根目录下执行<code>mvn springboot:run</code></li>\n<li>直接运行<code>BlogWebApplication.java</code></li>\n</ol>\n</li>\n<li>浏览器访问<code>http://127.0.0.1:8443</code></li>\n</ol>\n<p><strong>后台用户</strong></p>\n<p><em>超级管理员</em>: 账号:root 密码:123456 (本地测试使用这个账号,admin没设置权限)</p>\n<p><em>普通管理员</em>: 账号:admin 密码:123456</p>\n<p><em>评论审核管理员</em>: 账号:comment-admin 密码:123456</p>\n<p>注:后台用户的创建,尽可能做到<strong>权限最小化</strong></p>\n<p>更多详情,请参考【<a href=\"https://docs.zhyd.me\">Wiki</a>】</p>\n', '# OneBlog简介\nDBlog是一款简洁美观、自适应的Java博客系统。使用springboot开发,前端使用Bootstrap。支持移动端自适应,配有完备的前台和后台管理功能。\n \n**网站预览** \n \n[https://docs.zhyd.me](https://docs.zhyd.me) \n\n**开源地址** \n1. [Gitee](https://gitee.com/yadong.zhang/DBlog) \n2. [Github](https://github.com/zhangyd-c/DBlog) \n\n## 写在前面的话\nps: 虽然我知道,大部分人都是来了**直接下载源代码**后就潇洒的离开,并且只有等到下次**突然想到**“我天~~我得去看看OneBlog这烂项目更新新功能了吗”的时候才会重新来到这儿,即使你重新来过,我估计你也只有两个选择: \n\n发现更新代码了 --> 下载源码后重复上面的步骤 \n发现没更新代码 --> 直接关闭浏览器\n\n虽然我知道现实就是如此的残酷,但我还是要以我萤虫之力对各位到来的同仁发出一声诚挚的嘶吼:\n\n**如果喜欢,请多多分享!!多多Star!!fork可以,但还是请star一下!!**\n\n\n### 开发环境\n\n| 工具 | 版本或描述 |\n| ----- | -------------------- |\n| OS | Windows 7 |\n| JDK | 1.7+ |\n| IDE | IntelliJ IDEA 2017.3 |\n| Maven | 3.3.1 |\n| MySQL | 5.6.4 |\n\n### 模块划分\n\n| 模块 | 释义 |\n| ---------- | ----------------------- |\n| blog-core | 核心业务类模块,提供基本的数据操作、工具处理等 |\n| blog-admin | 后台管理模块 |\n| blog-web | 前台模块 |\n\n\n### 技术栈\n\n- Springboot 1.5.9\n- Apache Shiro 1.2.2\n- Logback\n- Redis\n- Lombok\n- Websocket\n- MySQL、Mybatis、Mapper、Pagehelper\n- Freemarker\n- Bootstrap 3.3.0\n- wangEditor\n- jQuery 1.11.1、jQuery Lazyload 1.9.7、fancybox、iCheck\n- 阿里云OSS\n- kaptcha\n- Qiniu\n- ...\n\n\n### 使用方法\n\n1. 使用IDE导入本项目\n2. 新建数据库`CREATE DATABASE dblog;`\n3. 导入数据库`docs/db/dblog.sql`\n4. 修改(`resources/application.yml`)配置文件\n 1. 数据库链接属性(可搜索`datasource`或定位到L.19) \n 2. redis配置(可搜索`redis`或定位到L.69)\n 3. mail配置(可搜索`mail`或定位到L.89)\n 4. 【[七牛云](http://qiniu.com)】配置(见sys_config表中qiniu_*开头的字段) \n 注:因为系统存在redis缓存,如果是第一次使用,可以直接修改sys_config表内容,如果不是第一次用,建议使用admin项目中的`系统配置`页面修改相关配置内容\n5. 运行项目(三种方式)\n 1. 项目根目录下执行`mvn -X clean package -Dmaven.test.skip=true`编译打包,然后执行`java -jar target/blog-web.jar`\n 2. 项目根目录下执行`mvn springboot:run`\n 3. 直接运行`BlogWebApplication.java`\n6. 浏览器访问`http://127.0.0.1:8443`\n\n\n**后台用户**\n\n_超级管理员_: 账号:root 密码:123456 (本地测试使用这个账号,admin没设置权限)\n\n_普通管理员_: 账号:admin 密码:123456\n\n_评论审核管理员_: 账号:comment-admin 密码:123456\n\n注:后台用户的创建,尽可能做到**权限最小化**\n\n更多详情,请参考【[Wiki](https://docs.zhyd.me)】', '0', '3', '1', '0', '1', 'OneBlog是一款简洁美观、自适应的Java博客系统。使用springboot开发,前端使用Bootstrap。支持移动端自适应,配有完备的前台和后台管理功能。', 'OneBlog,开源博客', '0', '', '0', now(), now());
# 清空标签表 # 清空标签表
TRUNCATE TABLE `dblog`.`biz_tags`; TRUNCATE TABLE `dblog`.`biz_tags`;
...@@ -27,9 +27,9 @@ INSERT INTO `dblog`.`biz_article_tags` VALUES ('2', '1', '2', now(), now()); ...@@ -27,9 +27,9 @@ INSERT INTO `dblog`.`biz_article_tags` VALUES ('2', '1', '2', now(), now());
# 清空文章分类表 # 清空文章分类表
TRUNCATE TABLE `dblog`.`biz_type`; TRUNCATE TABLE `dblog`.`biz_type`;
# 初始化文章分类 # 初始化文章分类
INSERT INTO `dblog`.`biz_type` VALUES ('1', null, '前端技术', '主要收集、整理的基础前端类文章,包括JS、jQuery和CSS等Web开发所需的基础的文章总结', '1', 'fa fa-css3', '1', now(), now()); INSERT INTO `dblog`.`biz_type` VALUES ('1', null, '前端技术', '主要收集、整理的基础前端类文章,包括JS、jQuery和CSS等Web开发所需的基础的文章总结', '1', 'fa fa-css3', 'nav', '1', now(), now());
INSERT INTO `dblog`.`biz_type` VALUES ('2', null, '后端技术', '网站中记录的后端类文章,包括Java、SSM、MySQL和其他在日常工作学习中所用的后端技术', '2', 'fa fa-coffee', '1', now(), now()); INSERT INTO `dblog`.`biz_type` VALUES ('2', null, '后端技术', '网站中记录的后端类文章,包括Java、SSM、MySQL和其他在日常工作学习中所用的后端技术', '2', 'fa fa-coffee', 'nav', '1', now(), now());
INSERT INTO `dblog`.`biz_type` VALUES ('3', null, '其他文章', '记录网站建设以及日常工作、学习中的闲言碎语和个人笔记等文章', '3', 'fa fa-folder-open-o', '1', now(), now()); INSERT INTO `dblog`.`biz_type` VALUES ('3', null, '其他文章', '记录网站建设以及日常工作、学习中的闲言碎语和个人笔记等文章', '3', 'fa fa-folder-open-o', 'nav', '1', now(), now());
# 清空系统配置表 # 清空系统配置表
TRUNCATE TABLE `dblog`.`sys_config`; TRUNCATE TABLE `dblog`.`sys_config`;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<groupId>com.zyd</groupId> <groupId>com.zyd</groupId>
<artifactId>blog</artifactId> <artifactId>blog</artifactId>
<version>2.3.2</version> <version>2.3.3</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<modules> <modules>
<module>blog-core</module> <module>blog-core</module>
...@@ -59,27 +59,27 @@ ...@@ -59,27 +59,27 @@
<dependency> <dependency>
<groupId>com.zyd</groupId> <groupId>com.zyd</groupId>
<artifactId>blog-core</artifactId> <artifactId>blog-core</artifactId>
<version>2.3.2</version> <version>2.3.3</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.zyd</groupId> <groupId>com.zyd</groupId>
<artifactId>blog-admin</artifactId> <artifactId>blog-admin</artifactId>
<version>2.3.2</version> <version>2.3.3</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.zyd</groupId> <groupId>com.zyd</groupId>
<artifactId>blog-web</artifactId> <artifactId>blog-web</artifactId>
<version>2.3.2</version> <version>2.3.3</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.zyd</groupId> <groupId>com.zyd</groupId>
<artifactId>blog-file</artifactId> <artifactId>blog-file</artifactId>
<version>2.3.2</version> <version>2.3.3</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.zyd</groupId> <groupId>com.zyd</groupId>
<artifactId>blog-codegen</artifactId> <artifactId>blog-codegen</artifactId>
<version>2.3.2</version> <version>2.3.3</version>
</dependency> </dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
......
...@@ -3,6 +3,14 @@ ...@@ -3,6 +3,14 @@
---- ----
### 2021-11-01
- 增加定时任务:“每晚凌晨12点自动检查友联,对于私自取消友联的网站实行自动封禁”
- 文章支持设置【登录后可见】
- 优化web端的分类展示,支持以滚动菜单的形式展示分类,防止因分类太多导致菜单栏溢出的问题
- 支持禁用一言插件(该插件部分时候加载较慢)
- 文章长期未修改时,向用户提示
### 2021-10-29 ### 2021-10-29
- wangEditor 升级到 4.7.9 - wangEditor 升级到 4.7.9
......