修复权限问题,修复boot ajax 返回解析问题
This commit is contained in:
parent
efc8854e83
commit
052c6039fe
|
@ -33,7 +33,6 @@
|
|||
<orderEntry type="library" name="Maven: javax.validation:validation-api:1.1.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.1.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-web:4.3.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:4.3.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:4.3.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:1.4.7.RELEASE" level="project" />
|
||||
|
@ -66,7 +65,6 @@
|
|||
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-freemarker:1.4.7.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.26-incubating" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:4.3.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid:1.0.24" level="project" />
|
||||
<orderEntry type="module-library">
|
||||
|
@ -147,5 +145,7 @@
|
|||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.1.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:4.3.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.9.RELEASE" level="project" />
|
||||
</component>
|
||||
</module>
|
|
@ -35,7 +35,6 @@
|
|||
<orderEntry type="library" name="Maven: javax.validation:validation-api:1.1.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.1.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-web:4.3.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:4.3.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:4.3.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:1.4.7.RELEASE" level="project" />
|
||||
|
@ -68,7 +67,6 @@
|
|||
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-freemarker:1.4.7.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.26-incubating" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:4.3.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid:1.0.24" level="project" />
|
||||
<orderEntry type="module-library">
|
||||
|
@ -149,5 +147,7 @@
|
|||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.1.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:4.3.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.9.RELEASE" level="project" />
|
||||
</component>
|
||||
</module>
|
|
@ -92,7 +92,7 @@ public class LoginController {
|
|||
String msg=null;
|
||||
try{
|
||||
subject.login(token);
|
||||
subject.hasRole("admin");
|
||||
//subject.hasRole("admin");
|
||||
if(subject.isAuthenticated()){
|
||||
return "/main/main";
|
||||
}
|
||||
|
|
|
@ -1,260 +0,0 @@
|
|||
<#--
|
||||
Created by IntelliJ IDEA.
|
||||
User: zxm
|
||||
Date: 2017/12/11
|
||||
Time: 21:35
|
||||
To change this template use File | Settings | File Templates.-->
|
||||
|
||||
<#--<#assign c=JspTaglibs["/WEB-INF/taglib/c.tld"] />-->
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>zxm-脚手架</title>
|
||||
<meta name="renderer" content="webkit|ie-comp|ie-stand">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
|
||||
<meta http-equiv="Cache-Control" content="no-siteapp" />
|
||||
|
||||
<#--<link rel="shortcut icon" href="${re.contextPath}/plugin/x-admin/favicon.ico" type="image/x-icon" />-->
|
||||
<link rel="stylesheet" href="${re.contextPath}/plugin/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="${re.contextPath}/plugin/x-admin/css/font.css">
|
||||
<link rel="stylesheet" href="${re.contextPath}/plugin/x-admin/css/xadmin.css">
|
||||
<script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/x-admin/js/xadmin.js"></script>
|
||||
<style>
|
||||
.layui-this>a:hover{
|
||||
background-color: #009688;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 顶部开始 -->
|
||||
<div class="container">
|
||||
<div class="logo"><a href="/login">zxm-脚手架</a></div>
|
||||
<div class="left_open">
|
||||
<i title="展开左侧栏" class="iconfont"></i>
|
||||
</div>
|
||||
<ul class="layui-nav left fast-add" lay-filter="">
|
||||
<li class="layui-nav-item">
|
||||
<a href="javascript:;">+新增</a>
|
||||
<dl class="layui-nav-child"> <!-- 二级菜单 -->
|
||||
<dd><a onclick="x_admin_show('资讯','http://www.baidu.com')"><i class="iconfont"></i>资讯</a></dd>
|
||||
<dd><a onclick="x_admin_show('图片','http://www.baidu.com')"><i class="iconfont"></i>图片</a></dd>
|
||||
<dd><a onclick="x_admin_show('用户','http://www.baidu.com')"><i class="iconfont"></i>用户</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="layui-nav right" lay-filter="">
|
||||
<li class="layui-nav-item">
|
||||
<a href="javascript:;"> 欢迎您:<@shiro.principal/></a>
|
||||
<dl class="layui-nav-child"> <!-- 二级菜单 -->
|
||||
<dd><a onclick="x_admin_show('个人信息','http://www.baidu.com')">个人信息</a></dd>
|
||||
<dd><a onclick="x_admin_show('切换帐号','http://www.baidu.com')">切换帐号</a></dd>
|
||||
<dd><a href="/logout">退出</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li class="layui-nav-item to-index"><a href="/">前台首页</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<!-- 顶部结束 -->
|
||||
<!-- 中部开始 -->
|
||||
<!-- 左侧菜单开始 -->
|
||||
<div class="left-nav">
|
||||
<div id="side-nav">
|
||||
<ul id="nav">
|
||||
<li class="layui-this">
|
||||
<a href="javascript:;">
|
||||
<i class="iconfont"></i>
|
||||
<cite>系统管理</cite>
|
||||
<i class="iconfont nav_right"></i>
|
||||
</a>
|
||||
<ul class="sub-menu">
|
||||
|
||||
<li>
|
||||
<a _href="/user/showUser">
|
||||
<i class="layui-icon"></i>
|
||||
<cite>用户列表</cite>
|
||||
|
||||
</a>
|
||||
</li >
|
||||
<li>
|
||||
<a _href="/test">
|
||||
<i class="iconfont"></i>
|
||||
<cite>角色列表</cite>
|
||||
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a _href="user/mainTest">
|
||||
<i class="iconfont"></i>
|
||||
<cite>测试专用</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:;">
|
||||
<i class="iconfont"></i>
|
||||
<cite>权限列表</cite>
|
||||
<i class="iconfont nav_right"></i>
|
||||
</a>
|
||||
<ul class="sub-menu">
|
||||
<li>
|
||||
<a _href="xxx.html">
|
||||
<i class="iconfont"></i>
|
||||
<cite>会员列表</cite>
|
||||
|
||||
</a>
|
||||
</li >
|
||||
<li>
|
||||
<a _href="xx.html">
|
||||
<i class="iconfont"></i>
|
||||
<cite>会员删除</cite>
|
||||
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a _href="xx.html">
|
||||
<i class="iconfont"></i>
|
||||
<cite>等级管理</cite>
|
||||
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:;">
|
||||
<i class="iconfont"></i>
|
||||
<cite>订单管理</cite>
|
||||
<i class="iconfont nav_right"></i>
|
||||
</a>
|
||||
<ul class="sub-menu">
|
||||
<li>
|
||||
<a _href="order-list.html">
|
||||
<i class="iconfont"></i>
|
||||
<cite>订单列表</cite>
|
||||
</a>
|
||||
</li >
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:;">
|
||||
<i class="iconfont"></i>
|
||||
<cite>管理员管理</cite>
|
||||
<i class="iconfont nav_right"></i>
|
||||
</a>
|
||||
<ul class="sub-menu">
|
||||
<li>
|
||||
<a _href="admin-list.html">
|
||||
<i class="iconfont"></i>
|
||||
<cite>管理员列表</cite>
|
||||
</a>
|
||||
</li >
|
||||
<li>
|
||||
<a _href="admin-role.html">
|
||||
<i class="iconfont"></i>
|
||||
<cite>角色管理</cite>
|
||||
</a>
|
||||
</li >
|
||||
<li>
|
||||
<a _href="admin-cate.html">
|
||||
<i class="iconfont"></i>
|
||||
<cite>权限分类</cite>
|
||||
</a>
|
||||
</li >
|
||||
<li>
|
||||
<a _href="admin-rule.html">
|
||||
<i class="iconfont"></i>
|
||||
<cite>权限管理</cite>
|
||||
</a>
|
||||
</li >
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:;">
|
||||
<i class="iconfont"></i>
|
||||
<cite>系统统计</cite>
|
||||
<i class="iconfont nav_right"></i>
|
||||
</a>
|
||||
<ul class="sub-menu">
|
||||
<li>
|
||||
<a _href="echarts1.html">
|
||||
<i class="iconfont"></i>
|
||||
<cite>拆线图</cite>
|
||||
</a>
|
||||
</li >
|
||||
<li>
|
||||
<a _href="echarts2.html">
|
||||
<i class="iconfont"></i>
|
||||
<cite>柱状图</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a _href="echarts3.html">
|
||||
<i class="iconfont"></i>
|
||||
<cite>地图</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a _href="echarts4.html">
|
||||
<i class="iconfont"></i>
|
||||
<cite>饼图</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a _href="echarts5.html">
|
||||
<i class="iconfont"></i>
|
||||
<cite>雷达图</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a _href="echarts6.html">
|
||||
<i class="iconfont"></i>
|
||||
<cite>k线图</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a _href="echarts7.html">
|
||||
<i class="iconfont"></i>
|
||||
<cite>热力图</cite>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a _href="echarts8.html">
|
||||
<i class="iconfont"></i>
|
||||
<cite>仪表图</cite>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="x-slide_left"></div> -->
|
||||
<!-- 左侧菜单结束 -->
|
||||
<!-- 右侧主体开始 -->
|
||||
<div class="page-content">
|
||||
<div class="layui-tab tab" lay-filter="xbs_tab" lay-allowclose="false">
|
||||
<ul class="layui-tab-title">
|
||||
<li>sql监控</li>
|
||||
</ul>
|
||||
<div class="layui-tab-content">
|
||||
<div class="layui-tab-item layui-show">
|
||||
<iframe src='/druid/index.html' frameborder="0" scrolling="yes" class="x-iframe"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-content-bg"></div>
|
||||
<!-- 右侧主体结束 -->
|
||||
<!-- 中部结束 -->
|
||||
<!-- 底部开始 -->
|
||||
<div class="footer">
|
||||
<div class="copyright">Copyright ©2017 len-脚手架 1.0 All Rights Reserved</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -17,11 +17,6 @@
|
|||
<script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.all.js"
|
||||
charset="utf-8"></script>
|
||||
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<style>
|
||||
.layui-input {
|
||||
height: 30px;
|
||||
|
@ -61,11 +56,11 @@
|
|||
</div>
|
||||
<div class="layui-col-md12" style="height:40px;margin-top:3px;">
|
||||
<div class="layui-btn-group">
|
||||
<shiro.hasPermission name="control:del">
|
||||
<@shiro.hasPermission name="control:del">
|
||||
<button class="layui-btn layui-btn-normal" data-type="del">
|
||||
<i class="layui-icon"></i>删除
|
||||
</button>
|
||||
</shiro.hasPermission>
|
||||
</@shiro.hasPermission>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -16,11 +16,6 @@ To change this template use File | Settings | File Templates.-->
|
|||
<link rel="stylesheet" href="${re.contextPath}/plugin/layui/css/layui.css">
|
||||
<script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.all.js" charset="utf-8"></script>
|
||||
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
@ -23,11 +23,11 @@
|
|||
<body>
|
||||
<div class="x-nav">
|
||||
<div class="layui-btn-group">
|
||||
<shiro.hasPermission name="nemu:add">
|
||||
<@shiro.hasPermission name="nemu:add">
|
||||
<button class="layui-btn layui-btn-normal" data-type="add">
|
||||
<i class="layui-icon"></i>新增
|
||||
</button>
|
||||
</shiro.hasPermission>
|
||||
</@shiro.hasPermission>
|
||||
</div>
|
||||
<button class="layui-btn layui-btn-sm" id="refresh" style="float: right;" onclick="javascript:location.replace(location.href);">
|
||||
<i class="layui-icon">ဂ</i>
|
||||
|
|
|
@ -19,10 +19,6 @@ To change this template use File | Settings | File Templates.-->
|
|||
<script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.all.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/ztree/js/jquery.ztree.core.js"></script>
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/ztree/js/jquery.ztree.excheck.js" charset="utf-8"></script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<script type="text/javascript">
|
||||
var setting = {
|
||||
check: {
|
||||
|
|
|
@ -17,11 +17,6 @@
|
|||
<script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.all.js"
|
||||
charset="utf-8"></script>
|
||||
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<style>
|
||||
.layui-input {
|
||||
height: 30px;
|
||||
|
@ -62,34 +57,34 @@
|
|||
</div>
|
||||
<div class="layui-col-md12" style="height:40px;margin-top:3px;">
|
||||
<div class="layui-btn-group">
|
||||
<shiro.hasPermission name="role:add">
|
||||
<@shiro.hasPermission name="role:add">
|
||||
<button class="layui-btn layui-btn-normal" data-type="add">
|
||||
<i class="layui-icon"></i>新增
|
||||
</button>
|
||||
</shiro.hasPermission>
|
||||
<shiro.hasPermission name="role:update">
|
||||
</@shiro.hasPermission>
|
||||
<#--<@shiro.hasPermission name="role:update">-->
|
||||
<button class="layui-btn layui-btn-normal" data-type="update">
|
||||
<i class="layui-icon"></i>编辑
|
||||
</button>
|
||||
</shiro.hasPermission>
|
||||
<shiro.hasPermission name="role:select">
|
||||
<#-- </@shiro.hasPermission>-->
|
||||
<@shiro.hasPermission name="role:select">
|
||||
<button class="layui-btn layui-btn-normal" data-type="detail">
|
||||
<i class="layui-icon"></i>查看
|
||||
</button>
|
||||
</shiro.hasPermission>
|
||||
</@shiro.hasPermission>
|
||||
</div>
|
||||
</div>
|
||||
<table id="roleList" class="layui-hide" lay-filter="user"></table>
|
||||
<script type="text/html" id="toolBar">
|
||||
<shiro.hasPermission name="role:add">
|
||||
<@shiro.hasPermission name="role:add">
|
||||
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
|
||||
</shiro.hasPermission>
|
||||
<shiro.hasPermission name="role:update">
|
||||
</@shiro.hasPermission>
|
||||
<@shiro.hasPermission name="role:update">
|
||||
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit">编辑</a>
|
||||
</shiro.hasPermission>
|
||||
<shiro.hasPermission name="role:del">
|
||||
</@shiro.hasPermission>
|
||||
<@shiro.hasPermission name="role:del">
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
|
||||
</shiro.hasPermission>
|
||||
</@shiro.hasPermission>
|
||||
</script>
|
||||
<script>
|
||||
layui.laytpl.toDateString = function(d, format){
|
||||
|
|
|
@ -19,11 +19,6 @@ To change this template use File | Settings | File Templates.-->
|
|||
<script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.all.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/ztree/js/jquery.ztree.core.js"></script>
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/ztree/js/jquery.ztree.excheck.js" charset="utf-8"></script>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<script type="text/javascript">
|
||||
var setting = {
|
||||
check: {
|
||||
|
|
|
@ -16,11 +16,6 @@ To change this template use File | Settings | File Templates.-->
|
|||
<link rel="stylesheet" href="${re.contextPath}/plugin/layui/css/layui.css">
|
||||
<script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.all.js" charset="utf-8"></script>
|
||||
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
@ -16,11 +16,6 @@ To change this template use File | Settings | File Templates.-->
|
|||
<link rel="stylesheet" href="${re.contextPath}/plugin/layui/css/layui.css">
|
||||
<script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.all.js" charset="utf-8"></script>
|
||||
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
@ -16,11 +16,6 @@ To change this template use File | Settings | File Templates.-->
|
|||
<link rel="stylesheet" href="${re.contextPath}/plugin/layui/css/layui.css">
|
||||
<script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.all.js" charset="utf-8"></script>
|
||||
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
$.fn.disable = function () {
|
||||
|
|
|
@ -17,11 +17,6 @@
|
|||
<script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.all.js"
|
||||
charset="utf-8"></script>
|
||||
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<style>
|
||||
.layui-input {
|
||||
height: 30px;
|
||||
|
@ -62,39 +57,39 @@
|
|||
</div>
|
||||
<div class="layui-col-md12" style="height:40px;margin-top:3px;">
|
||||
<div class="layui-btn-group">
|
||||
<shiro.hasPermission name="user:select">
|
||||
<@shiro.hasPermission name="user:select">
|
||||
<button class="layui-btn layui-btn-normal" data-type="add">
|
||||
<i class="layui-icon"></i>新增
|
||||
</button>
|
||||
</shiro.hasPermission>
|
||||
<shiro.hasPermission name="user:select">
|
||||
</@shiro.hasPermission>
|
||||
<@shiro.hasPermission name="user:select">
|
||||
<button class="layui-btn layui-btn-normal" data-type="update">
|
||||
<i class="layui-icon"></i>编辑
|
||||
</button>
|
||||
</shiro.hasPermission>
|
||||
<shiro.hasPermission name="user:del">
|
||||
</@shiro.hasPermission>
|
||||
<@shiro.hasPermission name="user:del">
|
||||
<button class="layui-btn layui-btn-normal" data-type="detail">
|
||||
<i class="layui-icon"></i>查看
|
||||
</button>
|
||||
</shiro.hasPermission>
|
||||
<shiro.hasPermission name="user:repass">
|
||||
</@shiro.hasPermission>
|
||||
<@shiro.hasPermission name="user:repass">
|
||||
<button class="layui-btn layui-btn-normal" data-type="changePwd">
|
||||
<i class="layui-icon"></i>修改密码
|
||||
</button>
|
||||
</shiro.hasPermission>
|
||||
</@shiro.hasPermission>
|
||||
</div>
|
||||
</div>
|
||||
<table id="userList" class="layui-hide" lay-filter="user"></table>
|
||||
<script type="text/html" id="barDemo">
|
||||
<shiro.hasPermission name="user:select">
|
||||
<@shiro.hasPermission name="user:select">
|
||||
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
|
||||
</shiro.hasPermission>
|
||||
<shiro.hasPermission name="user:update">
|
||||
</@shiro.hasPermission>
|
||||
<@shiro.hasPermission name="user:update">
|
||||
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit">编辑</a>
|
||||
</shiro.hasPermission>
|
||||
<shiro.hasPermission name="user:del">
|
||||
</@shiro.hasPermission>
|
||||
<@shiro.hasPermission name="user:del">
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
|
||||
</shiro.hasPermission>
|
||||
</@shiro.hasPermission>
|
||||
</script>
|
||||
<script type="text/html" id="switchTpl">
|
||||
<input type="checkbox" name="sex" lay-skin="switch" lay-text="女|男" lay-filter="sexDemo">
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<link rel="shortcut icon" href="${re.contextPath}/plugin/x-admin/favicon.ico" type="image/x-icon" />
|
||||
<link rel="stylesheet" href="${re.contextPath}/plugin/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="${re.contextPath}/plugin/x-admin/css/font.css">
|
||||
<link rel="stylesheet" href="${re.contextPath}/plugin/x-admin/css/xadmin.css">
|
||||
<script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="${re.contextPath}/plugin/x-admin/js/xadmin.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<#macro tree data start end>
|
||||
<#if (start=="start")>
|
||||
<div class="left-nav">
|
||||
<div id="side-nav">
|
||||
<ul id="nav">
|
||||
</#if>
|
||||
<#list data as child>
|
||||
<#if child.children?size gt 0>
|
||||
<li><a href="javascript:;">
|
||||
<i class="iconfont"></i><cite>${child.name}</cite><i class="iconfont nav_right"></i></a><ul class="sub-menu">
|
||||
<@tree data=child.children start="" end=""/>
|
||||
</ul>
|
||||
</li>
|
||||
<#else>
|
||||
<li>
|
||||
<a _href="order-list.html">
|
||||
<i class="iconfont"></i>
|
||||
<cite>${child.name}</cite>
|
||||
</a>
|
||||
</li>
|
||||
</#if>
|
||||
</#list>
|
||||
<#if (end=="end")>
|
||||
</ul>
|
||||
</div></div>
|
||||
</#if>
|
||||
</#macro>
|
||||
<@tree data=menu1 start="start" end="end"/>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -45,7 +45,6 @@
|
|||
<orderEntry type="library" name="Maven: javax.validation:validation-api:1.1.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.1.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-web:4.3.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:4.3.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:4.3.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:1.4.7.RELEASE" level="project" />
|
||||
|
@ -78,7 +77,6 @@
|
|||
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-freemarker:1.4.7.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.26-incubating" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:4.3.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid:1.0.24" level="project" />
|
||||
<orderEntry type="module-library">
|
||||
|
@ -159,5 +157,7 @@
|
|||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.1.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:4.3.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:4.3.9.RELEASE" level="project" />
|
||||
</component>
|
||||
</module>
|
|
@ -14,6 +14,7 @@ import org.springframework.context.annotation.Bean;
|
|||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
import org.springframework.web.filter.DelegatingFilterProxy;
|
||||
|
||||
/**
|
||||
* @author zhuxiaomeng
|
||||
|
@ -64,6 +65,11 @@ public class DruidConfig {
|
|||
filterRegistrationBean.setFilter(new WebStatFilter());
|
||||
filterRegistrationBean.addUrlPatterns("/*");
|
||||
filterRegistrationBean.addInitParameter("exclusions", "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*");
|
||||
DelegatingFilterProxy proxy = new DelegatingFilterProxy();
|
||||
proxy.setTargetFilterLifecycle(true);
|
||||
proxy.setTargetBeanName("shiroFilter");
|
||||
|
||||
filterRegistrationBean.setFilter(proxy);
|
||||
return filterRegistrationBean;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
package com.len.config;
|
||||
|
||||
import com.jagregory.shiro.freemarker.ShiroTags;
|
||||
import freemarker.template.TemplateException;
|
||||
import freemarker.template.TemplateModelException;
|
||||
import java.io.IOException;
|
||||
import java.util.Properties;
|
||||
import javax.annotation.PostConstruct;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.ui.freemarker.FreeMarkerConfigurationFactory;
|
||||
|
@ -17,6 +21,14 @@ import org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver;
|
|||
@Configuration
|
||||
public class FreeMarkerConfig {
|
||||
|
||||
@Autowired
|
||||
private freemarker.template.Configuration configuration;
|
||||
|
||||
@PostConstruct
|
||||
public void setSharedVariable() throws TemplateModelException {
|
||||
configuration.setSharedVariable("shiro", new ShiroTags());
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ViewResolver viewResolver() {
|
||||
FreeMarkerViewResolver resolver = new FreeMarkerViewResolver();
|
||||
|
|
|
@ -14,6 +14,7 @@ import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSource
|
|||
import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
|
||||
import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
|
||||
import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
@ -29,8 +30,6 @@ import org.springframework.web.filter.DelegatingFilterProxy;
|
|||
@Configuration
|
||||
public class ShiroConfig {
|
||||
|
||||
private static Map<String, String> filterMap = new LinkedHashMap<>();
|
||||
|
||||
@Bean
|
||||
public RetryLimitCredentialsMatcher getRetryLimitCredentialsMatcher(){
|
||||
RetryLimitCredentialsMatcher rm=new RetryLimitCredentialsMatcher(getCacheManager(),"5");
|
||||
|
@ -39,7 +38,7 @@ public class ShiroConfig {
|
|||
return rm;
|
||||
|
||||
}
|
||||
@Bean
|
||||
@Bean(name = "loginRealm")
|
||||
public LoginRealm getLoginRealm(){
|
||||
LoginRealm realm= new LoginRealm();
|
||||
realm.setCredentialsMatcher(getRetryLimitCredentialsMatcher());
|
||||
|
@ -58,18 +57,10 @@ public class ShiroConfig {
|
|||
return new LifecycleBeanPostProcessor();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public DefaultAdvisorAutoProxyCreator getDefaultAdvisorAutoProxyCreator(){
|
||||
getLifecycleBeanPostProcessor();
|
||||
DefaultAdvisorAutoProxyCreator dc=new DefaultAdvisorAutoProxyCreator();
|
||||
dc.setProxyTargetClass(true);
|
||||
return dc;
|
||||
}
|
||||
|
||||
@Bean(name="securityManager")
|
||||
public DefaultWebSecurityManager getDefaultWebSecurityManager(){
|
||||
public DefaultWebSecurityManager getDefaultWebSecurityManager(@Qualifier("loginRealm") LoginRealm loginRealm){
|
||||
DefaultWebSecurityManager dwm=new DefaultWebSecurityManager();
|
||||
dwm.setRealm(getLoginRealm());
|
||||
dwm.setRealm(loginRealm);
|
||||
dwm.setCacheManager(getCacheManager());
|
||||
return dwm;
|
||||
}
|
||||
|
@ -90,16 +81,16 @@ public class ShiroConfig {
|
|||
}
|
||||
|
||||
@Bean(name = "shiroFilter")
|
||||
public ShiroFilterFactoryBean getShiroFilterFactoryBean(){
|
||||
public ShiroFilterFactoryBean getShiroFilterFactoryBean(@Qualifier("securityManager") DefaultWebSecurityManager securityManager){
|
||||
ShiroFilterFactoryBean sfb = new ShiroFilterFactoryBean();
|
||||
sfb.setSecurityManager(getDefaultWebSecurityManager());
|
||||
sfb.setSecurityManager(securityManager);
|
||||
sfb.setLoginUrl("/login");
|
||||
sfb.setUnauthorizedUrl("/goLogin");
|
||||
Map<String, Filter> filters=new HashMap<>();
|
||||
filters.put("per",getPermissionFilter());
|
||||
filters.put("verCode",getVerfityCodeFilter());
|
||||
sfb.setFilters(filters);
|
||||
|
||||
Map<String, String> filterMap = new LinkedHashMap<>();
|
||||
filterMap.put("/login","verCode,anon");
|
||||
//filterMap.put("/login","anon");
|
||||
filterMap.put("/getCode","anon");
|
||||
|
@ -119,21 +110,22 @@ public class ShiroConfig {
|
|||
}
|
||||
|
||||
@Bean
|
||||
public AuthorizationAttributeSourceAdvisor getAuthorizationAttributeSourceAdvisor(){
|
||||
public AuthorizationAttributeSourceAdvisor getAuthorizationAttributeSourceAdvisor(@Qualifier("securityManager") DefaultWebSecurityManager securityManager){
|
||||
AuthorizationAttributeSourceAdvisor as=new AuthorizationAttributeSourceAdvisor();
|
||||
as.setSecurityManager(getDefaultWebSecurityManager());
|
||||
as.setSecurityManager(securityManager);
|
||||
return as;
|
||||
}
|
||||
|
||||
/*
|
||||
@Bean
|
||||
public FilterRegistrationBean delegatingFilterProxy(){
|
||||
FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean();
|
||||
DelegatingFilterProxy proxy = new DelegatingFilterProxy();
|
||||
proxy.setTargetFilterLifecycle(true);
|
||||
proxy.setTargetBeanName("shiroFilter");
|
||||
|
||||
filterRegistrationBean.setFilter(proxy);
|
||||
return filterRegistrationBean;
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.len.config;
|
||||
|
||||
import com.alibaba.druid.support.http.WebStatFilter;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
import com.alibaba.fastjson.support.config.FastJsonConfig;
|
||||
import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
|
||||
|
@ -12,6 +13,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import org.springframework.boot.autoconfigure.web.HttpMessageConverters;
|
||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.MediaType;
|
||||
|
@ -40,6 +42,9 @@ public class WebMvcConfig extends WebMvcConfigurerAdapter {
|
|||
StringHttpMessageConverter converter = new StringHttpMessageConverter(Charset.forName("UTF-8"));
|
||||
return converter;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
|
||||
super.configureMessageConverters(converters);
|
||||
|
|
Loading…
Reference in New Issue