Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
智布道
OneBlog
提交
dae1f23f
O
OneBlog
项目概览
智布道
/
OneBlog
9 个月 前同步成功
通知
11
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
OneBlog
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
dae1f23f
编写于
2月 01, 2019
作者:
智布道
👁
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
👽
第三方登陆(未实现)
上级
786f0e28
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
214 addition
and
17 deletion
+214
-17
blog-admin/src/main/java/com/zyd/blog/core/shiro/ShiroService.java
...n/src/main/java/com/zyd/blog/core/shiro/ShiroService.java
+1
-1
blog-admin/src/main/resources/static/assets/css/zhyd.core.css
...-admin/src/main/resources/static/assets/css/zhyd.core.css
+46
-0
blog-admin/src/main/resources/static/assets/js/zhyd.core.js
blog-admin/src/main/resources/static/assets/js/zhyd.core.js
+38
-5
blog-admin/src/main/resources/templates/config.ftl
blog-admin/src/main/resources/templates/config.ftl
+118
-1
blog-core/src/main/resources/config/application-center-dev.yml
...core/src/main/resources/config/application-center-dev.yml
+7
-7
blog-core/src/main/resources/config/application-center-test.yml
...ore/src/main/resources/config/application-center-test.yml
+3
-3
blog-web/src/main/resources/application-test.yml
blog-web/src/main/resources/application-test.yml
+1
-0
未找到文件。
blog-admin/src/main/java/com/zyd/blog/core/shiro/ShiroService.java
浏览文件 @
dae1f23f
...
...
@@ -49,7 +49,7 @@ public class ShiroService {
/*
配置访问权限
- anon:所有url都都可以匿名访问
- authc: 需要认证才能进行访问(此处指所有非匿名的路径都需要登
陆
才能访问)
- authc: 需要认证才能进行访问(此处指所有非匿名的路径都需要登
录
才能访问)
- user:配置记住我或认证通过可以访问
*/
Map
<
String
,
String
>
filterChainDefinitionMap
=
new
LinkedHashMap
<
String
,
String
>();
...
...
blog-admin/src/main/resources/static/assets/css/zhyd.core.css
浏览文件 @
dae1f23f
...
...
@@ -5057,4 +5057,50 @@ ul, menu, dir {
background
:
rgba
(
84
,
92
,
99
,
.1
);
border-radius
:
12px
;
cursor
:
pointer
;
}
.mask
{
position
:
absolute
;
top
:
0
;
left
:
0
;
bottom
:
0
;
right
:
0
;
background-color
:
rgba
(
255
,
255
,
255
,
0.9
);
display
:
-webkit-box
;
display
:
-ms-flexbox
;
display
:
flex
;
-webkit-box-align
:
center
;
-ms-flex-align
:
center
;
align-items
:
center
;
-webkit-box-pack
:
center
;
-ms-flex-pack
:
center
;
justify-content
:
center
;
-webkit-box-orient
:
horizontal
;
-webkit-box-direction
:
normal
;
-ms-flex-direction
:
row
;
flex-direction
:
row
;
color
:
#555
;
border-radius
:
3px
;
z-index
:
9999
;
}
.mask
.masker
{
position
:
relative
;
width
:
30px
;
}
.mask
.masker
i
{
font-size
:
30px
;
font-weight
:
400
;
}
.mask
.text
{
font-size
:
24px
;
margin-top
:
10px
;
}
.mask.lock
{
cursor
:
not-allowed
;
background-color
:
#eee
;
opacity
:
1
;
}
.mask.load
{
}
\ No newline at end of file
blog-admin/src/main/resources/static/assets/js/zhyd.core.js
浏览文件 @
dae1f23f
...
...
@@ -59,8 +59,8 @@ var zhyd = window.zhyd || {
$
(
'
select[target="tagsinput"], input[target="tagsinput"]
'
).
each
(
function
()
{
var
$this
=
$
(
this
);
var
$bindBox
=
$this
.
data
(
"
bind-box
"
);
if
(
!
$bindBox
||
$bindBox
.
length
<=
0
)
{
return
;
if
(
!
$bindBox
||
$bindBox
.
length
<=
0
)
{
return
;
}
$this
.
tagsinput
({
...
...
@@ -72,18 +72,19 @@ var zhyd = window.zhyd || {
focusClass
:
'
focus
'
});
function
add
(){
function
add
()
{
var
thisId
=
$
(
this
).
data
(
"
value
"
);
var
thisText
=
$
(
this
).
text
().
trim
();
$this
.
tagsinput
(
'
add
'
,
{
"
id
"
:
thisId
,
"
name
"
:
thisText
},
{
add
:
false
});
}
$
(
$bindBox
).
find
(
"
li
"
).
each
(
function
()
{
var
$li
=
$
(
this
);
$li
.
bind
(
'
click
'
,
add
);
});
$
(
"
.bootstrap-tagsinput input
"
).
bind
(
'
keydown
'
,
function
(
event
)
{
$
(
"
.bootstrap-tagsinput input
"
).
bind
(
'
keydown
'
,
function
(
event
)
{
var
thisVal
=
$
(
this
).
val
();
if
(
event
.
key
==
'
Enter
'
||
event
.
keyCode
==
'
13
'
)
{
if
(
event
.
key
==
'
Enter
'
||
event
.
keyCode
==
'
13
'
)
{
$
.
post
(
'
/tag/add
'
,
{
name
:
thisVal
,
description
:
thisVal
},
function
(
response
)
{
if
(
response
.
status
!==
200
)
{
$
.
alert
.
error
(
response
.
message
);
...
...
@@ -400,6 +401,37 @@ var zhyd = window.zhyd || {
}
}
}
},
mask
:
{
_box
:
'
<div class="mask {{maskType}}"><div class="masker"><i class="{{icon}}"></i></div><h3 class="text">{{text}}</h3></div>
'
,
_icon
:
{
load
:
"
fa fa-spinner fa-spin
"
,
lock
:
"
fa fa-lock
"
},
_open
:
function
(
container
,
msg
,
type
)
{
var
html
=
Mustache
.
render
(
this
.
_box
,
{
icon
:
this
.
_icon
[
type
],
text
:
msg
,
maskType
:
type
});
$
(
container
).
append
(
html
);
},
init
:
function
()
{
console
.
log
(
"
init mask...
"
);
$
(
"
.loading
"
).
each
(
function
()
{
var
$this
=
$
(
this
);
if
(
!
$this
.
hasClass
(
"
locking
"
))
{
zhyd
.
mask
.
loading
(
$this
,
$this
.
data
(
"
mask
"
));
}
});
$
(
"
.locking
"
).
each
(
function
()
{
var
$this
=
$
(
this
);
zhyd
.
mask
.
locking
(
$this
,
$this
.
data
(
"
mask
"
));
});
},
loading
:
function
(
container
,
msg
)
{
this
.
_open
(
container
,
msg
||
"
Loading
"
,
"
load
"
);
},
locking
:
function
(
container
,
msg
)
{
this
.
_open
(
container
,
msg
||
"
Locking
"
,
"
lock
"
);
}
}
};
...
...
@@ -448,6 +480,7 @@ $(document).ready(function () {
});
zhyd
.
combox
.
init
();
zhyd
.
tagsInput
.
init
();
zhyd
.
mask
.
init
();
/**
* 针对shiro框架中, ajax请求时session过期后的页面跳转
...
...
blog-admin/src/main/resources/templates/config.ftl
浏览文件 @
dae1f23f
...
...
@@ -26,6 +26,9 @@
<li role="presentation">
<a href="#tab_qiniu" id="qiniu-tab" role="tab" data-toggle="tab" aria-expanded="true">云存储</a>
</li>
<li role="presentation">
<a href="#tab_auth" id="auth-tab" role="tab" data-toggle="tab" aria-expanded="true">第三方登录</a>
</li>
<li role="presentation">
<a href="#tab_comment" id="comment-tab" role="tab" data-toggle="tab" aria-expanded="true">评论</a>
</li>
...
...
@@ -170,11 +173,125 @@
</div>
</form>
</div>
<div role="tabpanel" class="tab-pane fade" id="tab_auth" aria-labelledby="auth-tab">
<form class="form-horizontal form-label-left" novalidate>
<div class="col-md-6">
<div class="x_panel">
<div class="x_title">
<h2><i class="fa fa-github"></i> GitHub <small><a href="https://github.com/settings/developers" target="_blank">OAuth Apps</a></small></h2>
<div class="clearfix"></div>
</div>
<div class="x_content locking" data-mask="暂不支持,敬请期待!">
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="githubClientId">Client ID
<i class="fa fa-question-circle" title="GitHub OAuth Apps的Client ID"></i>
</label>
<div class="col-md-6 col-sm-6 col-xs-12 fixed-radio-checkbox">
<input type="text" class="form-control col-md-7 col-xs-12" name="githubClientId" id="githubClientId" placeholder="请输入 client id"/>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="githubClientSecret">Client Secret
<i class="fa fa-question-circle" title="GitHub OAuth Apps的Client Secret"></i>
</label>
<div class="col-md-6 col-sm-6 col-xs-12 fixed-radio-checkbox">
<input type="text" class="form-control col-md-7 col-xs-12" name="githubClientSecret" id="githubClientSecret" placeholder="请输入 client secret"/>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="x_panel">
<div class="x_title">
<h2><i class="fa fa-git"></i> Gitee <small><a href="https://gitee.com/api/v5/oauth_doc#list_1" target="_blank">第三方应用</a></small></h2>
<div class="clearfix"></div>
</div>
<div class="x_content locking" data-mask="暂不支持,敬请期待!">
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="giteeClientId">Client ID
<i class="fa fa-question-circle" title="Gitee 应用的Client Id"></i>
</label>
<div class="col-md-6 col-sm-6 col-xs-12 fixed-radio-checkbox">
<input type="text" class="form-control col-md-7 col-xs-12" name="giteeClientId" id="giteeClientId" placeholder="请输入 client id"/>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="giteeClientSecret">Client Secret
<i class="fa fa-question-circle" title="Gitee 应用的Client Secret"></i>
</label>
<div class="col-md-6 col-sm-6 col-xs-12 fixed-radio-checkbox">
<input type="text" class="form-control col-md-7 col-xs-12" name="giteeClientSecret" id="giteeClientSecret" placeholder="请输入 client secret"/>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="x_panel">
<div class="x_title">
<h2><i class="fa fa-weibo"></i> Weibo <small><a href="https://open.weibo.com/apps" target="_blank">微博·开放平台</a></small></h2>
<div class="clearfix"></div>
</div>
<div class="x_content locking" data-mask="暂不支持,敬请期待!">
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="weiboClientId">App Key
<i class="fa fa-question-circle" title="weibo应用的App Key,可在“应用信息”-“基本信息”页面查看"></i>
</label>
<div class="col-md-6 col-sm-6 col-xs-12 fixed-radio-checkbox">
<input type="text" class="form-control col-md-7 col-xs-12" name="weiboClientId" id="weiboClientId" placeholder="请输入 App Key"/>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="weiboClientSecret">App Secret
<i class="fa fa-question-circle" title="weibo应用的App Secret,可在“应用信息”-“基本信息”页面查看"></i>
</label>
<div class="col-md-6 col-sm-6 col-xs-12 fixed-radio-checkbox">
<input type="text" class="form-control col-md-7 col-xs-12" name="weiboClientSecret" id="weiboClientSecret" placeholder="请输入 App Secret"/>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="x_panel">
<div class="x_title">
<h2><i class="fa fa-qq"></i> QQ <small><a href="https://connect.qq.com/" target="_blank">QQ互联</a></small></h2>
<div class="clearfix"></div>
</div>
<div class="x_content locking" data-mask="暂不支持,敬请期待!">
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="qqClientId">App Id
<i class="fa fa-question-circle" title="qq 开发者账号的App ID"></i>
</label>
<div class="col-md-6 col-sm-6 col-xs-12 fixed-radio-checkbox">
<input type="text" class="form-control col-md-7 col-xs-12" name="qqClientId" id="qqClientId" placeholder="请输入 App Id"/>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="qqClientSecret">App Secret
<i class="fa fa-question-circle" title="qq 开发者账号的App Secret"></i>
</label>
<div class="col-md-6 col-sm-6 col-xs-12 fixed-radio-checkbox">
<input type="text" class="form-control col-md-7 col-xs-12" name="qqClientSecret" id="qqClientSecret" placeholder="请输入 App Secret"/>
</div>
</div>
</div>
</div>
</div>
<div class="item form-group">
<div class="col-md-11 col-sm-11 col-xs-11">
<button type="button" class="btn btn-primary saveBtn"><i class="fa fa-save"> 保存</i></button>
</div>
</div>
</form>
</div>
<div role="tabpanel" class="tab-pane fade" id="tab_comment" aria-labelledby="comment-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 aero" for="anonymous">允许匿名评论?
<i class="fa fa-question-circle" title="【暂不可用】是否允许匿名评论,如果为否则必须需要登
陆
。"></i>
<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">
...
...
blog-core/src/main/resources/config/application-center-dev.yml
浏览文件 @
dae1f23f
spring
:
profiles
:
include
:
[
center
]
####### database Config #######
####### database Config #######
datasource
:
druid
:
connection-init-sqls
:
set names utf8mb4
...
...
@@ -9,8 +9,8 @@ spring:
type
:
com.alibaba.druid.pool.DruidDataSource
url
:
jdbc:mysql://localhost:3306/dblog?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false&allowPublicKeyRetrieval=true
username
:
root
password
:
####### Redis Config #######
password
:
root
####### Redis Config #######
redis
:
database
:
5
# Redis服务器地址
...
...
@@ -18,12 +18,12 @@ spring:
# Redis服务器连接端口
port
:
6379
# Redis服务器连接密码(默认为空)
password
:
password
:
qwe!@#123
####### redis缓存服务配置 #######
####### redis缓存服务配置 #######
session
:
store-type
:
redis
####### 自定义配置 #######
####### 自定义配置 #######
####### 自定义配置 #######
####### 自定义配置 #######
blog-core/src/main/resources/config/application-center-test.yml
浏览文件 @
dae1f23f
spring
:
profiles
:
include
:
[
center
]
####### database Config #######
####### database Config #######
datasource
:
druid
:
connection-init-sqls
:
set names utf8mb4
...
...
@@ -24,6 +24,6 @@ spring:
session
:
store-type
:
redis
####### 自定义配置 #######
####### 自定义配置 #######
####### 自定义配置 #######
####### 自定义配置 #######
blog-web/src/main/resources/application-test.yml
浏览文件 @
dae1f23f
...
...
@@ -51,6 +51,7 @@ spring:
# logging settings
logging
:
path
:
/var/tmp/website-blog-web
# braum过滤器,用于过滤恶意请求
braum
:
limit
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录