Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
fenghuo12
zheng
提交
0495aee4
Z
zheng
项目概览
fenghuo12
/
zheng
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zheng
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
0495aee4
编写于
8月 15, 2017
作者:
X
xulonggang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ucenter前台页面修改为Thymeleaf模版格式
上级
cc6f118d
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
93 addition
and
22 deletion
+93
-22
zheng-ucenter/zheng-ucenter-web/src/main/java/com/zheng/ucenter/web/interceptor/UcenterWebInterceptor.java
.../zheng/ucenter/web/interceptor/UcenterWebInterceptor.java
+57
-0
zheng-ucenter/zheng-ucenter-web/src/main/resources/springMVC-servlet.xml
...heng-ucenter-web/src/main/resources/springMVC-servlet.xml
+9
-0
zheng-ui/zheng-ucenter-web/login.html
zheng-ui/zheng-ucenter-web/login.html
+9
-7
zheng-ui/zheng-ucenter-web/password.html
zheng-ui/zheng-ucenter-web/password.html
+9
-7
zheng-ui/zheng-ucenter-web/reg.html
zheng-ui/zheng-ucenter-web/reg.html
+9
-8
未找到文件。
zheng-ucenter/zheng-ucenter-web/src/main/java/com/zheng/ucenter/web/interceptor/UcenterWebInterceptor.java
0 → 100644
浏览文件 @
0495aee4
package
com.zheng.ucenter.web.interceptor
;
import
com.zheng.common.util.PropertiesFileUtil
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.web.servlet.ModelAndView
;
import
org.springframework.web.servlet.handler.HandlerInterceptorAdapter
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
/**
* 公共拦截器
* Created by shuzheng on 2017/3/25.
*/
public
class
UcenterWebInterceptor
extends
HandlerInterceptorAdapter
{
private
static
Logger
_log
=
LoggerFactory
.
getLogger
(
UcenterWebInterceptor
.
class
);
// @Autowired
// private CmsMenuService cmsMenuService;
@Override
public
boolean
preHandle
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
)
throws
Exception
{
// 过滤ajax
if
(
null
!=
request
.
getHeader
(
"X-Requested-With"
)
&&
request
.
getHeader
(
"X-Requested-With"
).
equalsIgnoreCase
(
"XMLHttpRequest"
))
{
return
true
;
}
// zheng-ui静态资源配置信息
String
appName
=
PropertiesFileUtil
.
getInstance
().
get
(
"app.name"
);
String
uiPath
=
PropertiesFileUtil
.
getInstance
().
get
(
"zheng.ui.path"
);
request
.
setAttribute
(
"appName"
,
appName
);
request
.
setAttribute
(
"uiPath"
,
uiPath
);
// // 菜单
// CmsMenuExample cmsMenuExample = new CmsMenuExample();
// cmsMenuExample.setOrderByClause("orders asc");
// List<CmsMenu> menus = cmsMenuService.selectByExample(cmsMenuExample);
// request.setAttribute("menus", menus);
return
true
;
}
@Override
public
void
postHandle
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
,
ModelAndView
modelAndView
)
throws
Exception
{
super
.
postHandle
(
request
,
response
,
handler
,
modelAndView
);
}
@Override
public
void
afterCompletion
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
,
Exception
ex
)
throws
Exception
{
super
.
afterCompletion
(
request
,
response
,
handler
,
ex
);
}
@Override
public
void
afterConcurrentHandlingStarted
(
HttpServletRequest
request
,
HttpServletResponse
response
,
Object
handler
)
throws
Exception
{
super
.
afterConcurrentHandlingStarted
(
request
,
response
,
handler
);
}
}
zheng-ucenter/zheng-ucenter-web/src/main/resources/springMVC-servlet.xml
浏览文件 @
0495aee4
...
...
@@ -11,6 +11,15 @@
<!-- 根目录'/'对应页面 -->
<mvc:view-controller
path=
"/"
view-name=
"/index.jsp"
/>
<!-- 拦截器 -->
<mvc:interceptors>
<!-- 公共拦截器 -->
<mvc:interceptor>
<mvc:mapping
path=
"/**"
/>
<bean
class=
"com.zheng.ucenter.web.interceptor.UcenterWebInterceptor"
></bean>
</mvc:interceptor>
</mvc:interceptors>
<context:property-placeholder
location=
"classpath:config.properties"
/>
<!-- thymeleaf视图 -->
...
...
zheng-ui/zheng-ucenter-web/login.html
浏览文件 @
0495aee4
<!DOCTYPE html>
<html
lang=
"
en
"
>
<html
lang=
"
zh-CN"
xmlns:th=
"http://www.thymeleaf.org"
xmlns:sec=
"http://www.thymeleaf.org/thymeleaf-extras-springsecurity3
"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<title>
用户中心
</title>
<meta
content=
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
name=
"viewport"
>
<link
rel=
"stylesheet"
href=
"css/bootstrap.min.css
"
>
<link
rel=
"stylesheet"
th:href=
"@{${uiPath} + ${appName} + '/css/bootstrap.min.css'}
"
>
<link
rel=
"stylesheet"
href=
"//at.alicdn.com/t/font_ay4w4j5c2tke29.css"
>
<link
rel=
"stylesheet"
href=
"css/style.css
"
>
<link
rel=
"stylesheet"
th:href=
"@{${uiPath} + ${appName} + '/css/style.css'}
"
>
</head>
<body
class=
"login-page"
>
<div
class=
"login-box"
>
...
...
@@ -21,7 +21,7 @@
<i
class=
"iconfont icon-icon053"
></i>
<span>
登录
</span>
</div>
<div
class=
"col-xs-6"
style=
"text-align: right"
>
<a
href=
"
reg.html
"
>
注册
</a>
<a
href=
"
signup
"
>
注册
</a>
</div>
</div>
<!-- Nav tabs -->
...
...
@@ -55,7 +55,7 @@
<div
class=
"col-xs-6"
style=
"text-align: right"
>
<div
class=
"checkbox icheck"
>
<label>
<a
href=
"password
.html
"
>
忘记密码?
</a>
<a
href=
"password
_reset
"
>
忘记密码?
</a>
</label>
</div>
</div>
...
...
@@ -132,7 +132,9 @@
</div>
<!-- /.login-box -->
<script
src=
"js/jquery.min.js"
></script>
<script
src=
"js/bootstrap.min.js"
></script>
<script>
var
BASE_PATH
=
'
[[${#httpServletRequest.getContextPath()}]]
'
;
</script>
<script>
var
BACK_URL
=
'
[[${#httpServletRequest.getParameter("backurl")}]]
'
;
</script>
<script
src=
"js/jquery.min.js"
th:src=
"@{${uiPath} + ${appName} + '/js/jquery.min.js'}"
></script>
<script
src=
"js/bootstrap.min.js"
th:src=
"@{${uiPath} + ${appName} + '/js/bootstrap.min.js'}"
></script>
</body>
</html>
\ No newline at end of file
zheng-ui/zheng-ucenter-web/password.html
浏览文件 @
0495aee4
<!DOCTYPE html>
<html
lang=
"
en
"
>
<html
lang=
"
zh-CN"
xmlns:th=
"http://www.thymeleaf.org"
xmlns:sec=
"http://www.thymeleaf.org/thymeleaf-extras-springsecurity3
"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<title>
用户中心
</title>
<meta
content=
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
name=
"viewport"
>
<link
rel=
"stylesheet"
href=
"css/bootstrap.min.css
"
>
<link
rel=
"stylesheet"
th:href=
"@{${uiPath} + ${appName} + '/css/bootstrap.min.css'}
"
>
<link
rel=
"stylesheet"
href=
"//at.alicdn.com/t/font_ay4w4j5c2tke29.css"
>
<link
rel=
"stylesheet"
href=
"css/style.css
"
>
<link
rel=
"stylesheet"
th:href=
"@{${uiPath} + ${appName} + '/css/style.css'}
"
>
</head>
<body
class=
"login-page"
>
<div
class=
"login-box"
>
...
...
@@ -21,7 +21,7 @@
<i
class=
"iconfont icon-icon053"
></i>
<span>
找回密码
</span>
</div>
<div
class=
"col-xs-6"
style=
"text-align: right"
>
<a
href=
"
reg.html
"
>
注册
</a>
<a
href=
"
signup
"
>
注册
</a>
</div>
</div>
<form>
...
...
@@ -36,7 +36,7 @@
<span
class=
"glyphicon glyphicon-lock form-control-feedback"
style=
"right: 15px;"
></span>
</div>
<div
class=
"col-xs-6"
style=
"text-align: right"
>
<img
src=
"
img/captcha.png
"
alt=
""
style=
"border: 1px solid #ccc; height: 34px;"
>
<img
src=
"
@{${uiPath} + ${appName} + '/img/captcha.png'}
"
alt=
""
style=
"border: 1px solid #ccc; height: 34px;"
>
</div>
</div>
</div>
...
...
@@ -62,7 +62,9 @@
</div>
<!-- /.login-box -->
<script
src=
"js/jquery.min.js"
></script>
<script
src=
"js/bootstrap.min.js"
></script>
<script>
var
BASE_PATH
=
'
[[${#httpServletRequest.getContextPath()}]]
'
;
</script>
<script>
var
BACK_URL
=
'
[[${#httpServletRequest.getParameter("backurl")}]]
'
;
</script>
<script
src=
"js/jquery.min.js"
th:src=
"@{${uiPath} + ${appName} + '/js/jquery.min.js'}"
></script>
<script
src=
"js/bootstrap.min.js"
th:src=
"@{${uiPath} + ${appName} + '/js/bootstrap.min.js'}"
></script>
</body>
</html>
\ No newline at end of file
zheng-ui/zheng-ucenter-web/reg.html
浏览文件 @
0495aee4
<!DOCTYPE html>
<html
lang=
"
en
"
>
<html
lang=
"
zh-CN"
xmlns:th=
"http://www.thymeleaf.org"
xmlns:sec=
"http://www.thymeleaf.org/thymeleaf-extras-springsecurity3
"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<title>
用户中心
</title>
<meta
content=
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
name=
"viewport"
>
<link
rel=
"stylesheet"
href=
"css/bootstrap.min.css
"
>
<link
rel=
"stylesheet"
th:href=
"@{${uiPath} + ${appName} + '/css/bootstrap.min.css'}
"
>
<link
rel=
"stylesheet"
href=
"//at.alicdn.com/t/font_ay4w4j5c2tke29.css"
>
<link
rel=
"stylesheet"
href=
"css/style.css
"
>
<link
rel=
"stylesheet"
th:href=
"@{${uiPath} + ${appName} + '/css/style.css'}
"
>
</head>
<body
class=
"register-page"
>
<div
class=
"register-box"
>
...
...
@@ -21,7 +21,7 @@
<i
class=
"iconfont icon-icon053"
></i>
<span>
注册
</span>
</div>
<div
class=
"col-xs-6"
style=
"text-align: right"
>
<a
href=
"
login.html
"
>
已有账号? 登录
</a>
<a
href=
"
signin
"
>
已有账号? 登录
</a>
</div>
</div>
<!-- Nav tabs -->
...
...
@@ -51,7 +51,7 @@
<span
class=
"glyphicon glyphicon-lock form-control-feedback"
style=
"right: 15px;"
></span>
</div>
<div
class=
"col-xs-6"
style=
"text-align: right"
>
<img
src=
"
img/captcha.png
"
alt=
""
style=
"border: 1px solid #ccc; height: 34px;"
>
<img
src=
"
@{${uiPath} + ${appName} + '/img/captcha.png'}
"
alt=
""
style=
"border: 1px solid #ccc; height: 34px;"
>
</div>
</div>
</div>
...
...
@@ -127,8 +127,9 @@
</div>
<!-- /.login-box -->
<script
src=
"js/jquery.min.js"
></script>
<script
src=
"js/bootstrap.min.js"
></script>
<script>
var
BASE_PATH
=
'
[[${#httpServletRequest.getContextPath()}]]
'
;
</script>
<script>
var
BACK_URL
=
'
[[${#httpServletRequest.getParameter("backurl")}]]
'
;
</script>
<script
src=
"js/jquery.min.js"
th:src=
"@{${uiPath} + ${appName} + '/js/jquery.min.js'}"
></script>
<script
src=
"js/bootstrap.min.js"
th:src=
"@{${uiPath} + ${appName} + '/js/bootstrap.min.js'}"
></script>
</body>
</html>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录