jeecg 入门难度降低,去掉YUI压缩机制
parent
f5d116f279
commit
e2d75ac982
64
pom.xml
64
pom.xml
|
@ -958,22 +958,7 @@
|
||||||
</organization>
|
</organization>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<!-- 多war开发Maven支持-->
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-war-plugin</artifactId>
|
|
||||||
<version>2.6</version>
|
|
||||||
<configuration>
|
|
||||||
<warSourceExcludes>%regex[^plug-in.+(?:(?<!(?:-|\.)min)\.js)]
|
|
||||||
,%regex[^plug-in/accordion.+(?:(?<!(?:-|\.)min)\.css)]
|
|
||||||
,%regex[^plug-in/bootstrap.+(?:(?<!(?:-|\.)min)\.css)]
|
|
||||||
,%regex[^plug-in/easyui/themes/black.+(?:(?<!(?:-|\.)min)\.css)]
|
|
||||||
,%regex[^plug-in/easyui/themes/default.+(?:(?<!(?:-|\.)min)\.css)]
|
|
||||||
,%regex[^plug-in/Validform.+(?:(?<!(?:-|\.)min)\.css)]
|
|
||||||
</warSourceExcludes>
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
|
|
||||||
<!-- tomcat插件 -->
|
<!-- tomcat插件 -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
@ -1029,52 +1014,7 @@
|
||||||
</systemProperties>
|
</systemProperties>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<!-- YUI Compressor Maven压缩插件 -->
|
|
||||||
<groupId>net.alchim31.maven</groupId>
|
|
||||||
<artifactId>yuicompressor-maven-plugin</artifactId>
|
|
||||||
<version>1.3.0</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>process-resources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>compress</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
<configuration>
|
|
||||||
<!-- 读取js,css文件采用UTF-8编码 -->
|
|
||||||
<encoding>UTF-8</encoding>
|
|
||||||
<!-- 不显示js可能的错误 -->
|
|
||||||
<jswarn>false</jswarn>
|
|
||||||
<!-- 若存在已压缩的文件,会先对比源文件是否有改动 有改动便压缩,无改动就不压缩 -->
|
|
||||||
<force>false</force>
|
|
||||||
<!-- 在指定的列号后插入新行 -->
|
|
||||||
<linebreakpos>-1</linebreakpos>
|
|
||||||
<!-- 压缩之前先执行聚合文件操作 -->
|
|
||||||
<preProcessAggregates>true</preProcessAggregates>
|
|
||||||
<!-- 压缩后保存文件后缀 无后缀 -->
|
|
||||||
<nosuffix>true</nosuffix>
|
|
||||||
<!-- 源目录,即需压缩的根目录 -->
|
|
||||||
<sourceDirectory>src/main/webapp/plug-in</sourceDirectory>
|
|
||||||
<!-- 压缩js和css文件 -->
|
|
||||||
<includes>
|
|
||||||
<include>plug-in/**/*.js</include>
|
|
||||||
<include>plug-in/accordion/css/*.css</include>
|
|
||||||
<include>plug-in/bootstrap/css/*.css</include>
|
|
||||||
<include>plug-in/easyui/themes/black/*.css</include>
|
|
||||||
<include>plug-in/easyui/themes/default/*.css</include>
|
|
||||||
<include>plug-in/Validform/**/*.css</include>
|
|
||||||
</includes>
|
|
||||||
<!-- 以下目录和文件不会被压缩 -->
|
|
||||||
<excludes>
|
|
||||||
<exclude>plug-in/**/*.min.js</exclude>
|
|
||||||
<exclude>plug-in/**/*.dev.js</exclude>
|
|
||||||
<exclude>plug-in/*/css/*.min.css</exclude>
|
|
||||||
</excludes>
|
|
||||||
|
|
||||||
</configuration>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
<finalName>jeecg</finalName>
|
<finalName>jeecg</finalName>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
|
@ -91,7 +91,7 @@ public class AuthInterceptor implements HandlerInterceptor {
|
||||||
* 在controller前拦截
|
* 在controller前拦截
|
||||||
*/
|
*/
|
||||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object object) throws Exception {
|
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object object) throws Exception {
|
||||||
//update-begin--Author:taoYan Date:201706028 for:注解实现排除拦截
|
|
||||||
//判断是否被注解跳过权限认证 先判断类注解然后方法注解 都没有则走原来逻辑
|
//判断是否被注解跳过权限认证 先判断类注解然后方法注解 都没有则走原来逻辑
|
||||||
HandlerMethod handlerMethod=(HandlerMethod)object;
|
HandlerMethod handlerMethod=(HandlerMethod)object;
|
||||||
JAuth jauthType =handlerMethod.getBean().getClass().getAnnotation(JAuth.class);
|
JAuth jauthType =handlerMethod.getBean().getClass().getAnnotation(JAuth.class);
|
||||||
|
@ -109,25 +109,23 @@ public class AuthInterceptor implements HandlerInterceptor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//update-end--Author:taoYan Date:201706028 for:注解实现排除拦截
|
|
||||||
|
|
||||||
//update-begin--Author:dangzhenghui Date:20170627 for:TASK #2157 【bug】拦截器,需要判断过来的请求是否ajax,如果ajax则返回无权限json,非跳转页面
|
|
||||||
Boolean isAjax=isAjax(request,response);
|
Boolean isAjax=isAjax(request,response);
|
||||||
//update-end--Author:dangzhenghui Date:20170627 for:TASK #2157 【bug】拦截器,需要判断过来的请求是否ajax,如果ajax则返回无权限json,非跳转页面
|
|
||||||
String requestPath = ResourceUtil.getRequestPath(request);// 用户访问的资源地址
|
String requestPath = ResourceUtil.getRequestPath(request);// 用户访问的资源地址
|
||||||
//logger.info("-----authInterceptor----requestPath------"+requestPath);
|
//logger.info("-----authInterceptor----requestPath------"+requestPath);
|
||||||
//步骤一: 判断是否是排除拦截请求,直接返回TRUE
|
//步骤一: 判断是否是排除拦截请求,直接返回TRUE
|
||||||
//update-begin--Author:dangzhenghui Date:20170402 for:对外接口改造 api 设置为默认对外路径不用进行登陆验证
|
|
||||||
if (requestPath.length()>3&&"api/".equals(requestPath.substring(0,4))) {
|
if (requestPath.length()>3&&"api/".equals(requestPath.substring(0,4))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
//update-begin--Author:end Date:20170402 for:对外接口改造 api 设置为默认对外路径不用进行登陆验证
|
|
||||||
if (excludeUrls.contains(requestPath)) {
|
if (excludeUrls.contains(requestPath)) {
|
||||||
return true;
|
return true;
|
||||||
//update-begin--Author:zhoujf Date:20170426 for:TASK #1867 【改造】权限拦截器支持模糊匹配
|
|
||||||
} else if(moHuContain(excludeContainUrls, requestPath)){
|
} else if(moHuContain(excludeContainUrls, requestPath)){
|
||||||
return true;
|
return true;
|
||||||
//update-end--Author:zhoujf Date:20170426 for:TASK #1867 【改造】权限拦截器支持模糊匹配
|
|
||||||
} else {
|
} else {
|
||||||
//步骤二: 权限控制,优先重组请求URL(考虑online请求前缀一致问题)
|
//步骤二: 权限控制,优先重组请求URL(考虑online请求前缀一致问题)
|
||||||
String clickFunctionId = request.getParameter("clickFunctionId");
|
String clickFunctionId = request.getParameter("clickFunctionId");
|
||||||
|
@ -141,23 +139,23 @@ public class AuthInterceptor implements HandlerInterceptor {
|
||||||
if(requestPath.equals("cgAutoListController.do?list")) {
|
if(requestPath.equals("cgAutoListController.do?list")) {
|
||||||
requestPath += "&id=" + request.getParameter("id");
|
requestPath += "&id=" + request.getParameter("id");
|
||||||
}
|
}
|
||||||
//update-start--author:scott date:20170311 for:online新请求方式,权限控制------------
|
|
||||||
if(requestPath.endsWith("?olstylecode=")) {
|
if(requestPath.endsWith("?olstylecode=")) {
|
||||||
requestPath = requestPath.replace("?olstylecode=", "");
|
requestPath = requestPath.replace("?olstylecode=", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
//步骤三: 根据重组请求URL,进行权限授权判断
|
//步骤三: 根据重组请求URL,进行权限授权判断
|
||||||
if((!hasMenuAuth(requestPath,clickFunctionId,currLoginUser)) && !currLoginUser.getUserName().equals("admin")){
|
if((!hasMenuAuth(requestPath,clickFunctionId,currLoginUser)) && !currLoginUser.getUserName().equals("admin")){
|
||||||
//update-begin--Author:dangzhenghui Date:20170627 for:TASK #2157 【bug】拦截器,需要判断过来的请求是否ajax,如果ajax则返回无权限json,非跳转页面
|
|
||||||
if(isAjax){
|
if(isAjax){
|
||||||
processAjax(response);
|
processAjax(response);
|
||||||
}else {
|
}else {
|
||||||
response.sendRedirect(request.getSession().getServletContext().getContextPath()+"/loginController.do?noAuth");
|
response.sendRedirect(request.getSession().getServletContext().getContextPath()+"/loginController.do?noAuth");
|
||||||
}
|
}
|
||||||
//update-end--Author:dangzhenghui Date:20170627 for:TASK #2157 【bug】拦截器,需要判断过来的请求是否ajax,如果ajax则返回无权限json,非跳转页面
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//update-end--author:scott date:20170311 for:online新请求方式,权限控制------------
|
|
||||||
|
|
||||||
//解决rest风格下 权限失效问题
|
//解决rest风格下 权限失效问题
|
||||||
String functionId="";
|
String functionId="";
|
||||||
|
@ -168,27 +166,27 @@ public class AuthInterceptor implements HandlerInterceptor {
|
||||||
}else {
|
}else {
|
||||||
realRequestPath=uri;
|
realRequestPath=uri;
|
||||||
}
|
}
|
||||||
//update-begin--author:zhoujf date:20170307 for:TASK #1745 【bug】自定义表单数据权限控制方式 1. 普通控件通过“控件名称”来控制 2. 列表控件,通过“控件名称.表头”来控制
|
|
||||||
// if(!oConvertUtils.isEmpty(clickFunctionId)){
|
// if(!oConvertUtils.isEmpty(clickFunctionId)){
|
||||||
// functionId = clickFunctionId;
|
// functionId = clickFunctionId;
|
||||||
// }else{
|
// }else{
|
||||||
//update-begin--author:zhoujf date:20170304 for:自定义表单页面控件权限控制-------------
|
|
||||||
if(realRequestPath.indexOf("autoFormController/af/")>-1 && realRequestPath.indexOf("?")!=-1){
|
if(realRequestPath.indexOf("autoFormController/af/")>-1 && realRequestPath.indexOf("?")!=-1){
|
||||||
realRequestPath = realRequestPath.substring(0, realRequestPath.indexOf("?"));
|
realRequestPath = realRequestPath.substring(0, realRequestPath.indexOf("?"));
|
||||||
}
|
}
|
||||||
//update-end--author:scott date:20170304 for:自定义表单页面控件权限控制---------------
|
|
||||||
List<TSFunction> functions = systemService.findByProperty(TSFunction.class, "functionUrl", realRequestPath);
|
List<TSFunction> functions = systemService.findByProperty(TSFunction.class, "functionUrl", realRequestPath);
|
||||||
if (functions.size()>0){
|
if (functions.size()>0){
|
||||||
functionId = functions.get(0).getId();
|
functionId = functions.get(0).getId();
|
||||||
}
|
}
|
||||||
// }
|
// }
|
||||||
//update-begin--author:zhoujf date:20170307 for:TASK #1745 【bug】自定义表单数据权限控制方式 1. 普通控件通过“控件名称”来控制 2. 列表控件,通过“控件名称.表头”来控制
|
|
||||||
//Step.1 第一部分处理页面表单和列表的页面控件权限(页面表单字段+页面按钮等控件)
|
//Step.1 第一部分处理页面表单和列表的页面控件权限(页面表单字段+页面按钮等控件)
|
||||||
if(!oConvertUtils.isEmpty(functionId)){
|
if(!oConvertUtils.isEmpty(functionId)){
|
||||||
//update-begin-author:taoYan date:20170829 for:admin不作数据权限控制
|
|
||||||
if(!currLoginUser.getUserName().equals("admin")){
|
if(!currLoginUser.getUserName().equals("admin")){
|
||||||
//获取菜单对应的页面控制权限(包括表单字段和操作按钮)
|
//获取菜单对应的页面控制权限(包括表单字段和操作按钮)
|
||||||
//update-begin-author:taoYan date:20170814 for:TASK #2207 【权限bug】多个角色权限(并集问题),因为是反的控制,导致有admin的最大权限反而受小权限控制
|
|
||||||
List<TSOperation> operations = systemService.getOperationsByUserIdAndFunctionId(currLoginUser.getId(), functionId);
|
List<TSOperation> operations = systemService.getOperationsByUserIdAndFunctionId(currLoginUser.getId(), functionId);
|
||||||
request.setAttribute(Globals.NOAUTO_OPERATIONCODES, operations);
|
request.setAttribute(Globals.NOAUTO_OPERATIONCODES, operations);
|
||||||
if(operations==null){
|
if(operations==null){
|
||||||
|
@ -201,14 +199,13 @@ public class AuthInterceptor implements HandlerInterceptor {
|
||||||
request.setAttribute(Globals.OPERATIONCODES, operationCodes);
|
request.setAttribute(Globals.OPERATIONCODES, operationCodes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//update-end-author:taoYan date:20170829 for:admin不作数据权限控制
|
|
||||||
|
|
||||||
//Set<String> operationCodes = systemService.getOperationCodesByUserIdAndFunctionId(currLoginUser.getId(), functionId);
|
//Set<String> operationCodes = systemService.getOperationCodesByUserIdAndFunctionId(currLoginUser.getId(), functionId);
|
||||||
//request.setAttribute(Globals.OPERATIONCODES, operationCodes);
|
//request.setAttribute(Globals.OPERATIONCODES, operationCodes);
|
||||||
//}
|
//}
|
||||||
//if(!oConvertUtils.isEmpty(functionId)){
|
//if(!oConvertUtils.isEmpty(functionId)){
|
||||||
|
|
||||||
//update-begin--Author:scott Date:20170330 for:[online表单按钮\链接权限]jeecg 统一规则采用反的控制,授权的进行按钮或者字段 隐藏\禁用--------------------
|
|
||||||
|
|
||||||
// List<TSOperation> allOperation=this.systemService.findByProperty(TSOperation.class, "TSFunction.id", functionId);
|
// List<TSOperation> allOperation=this.systemService.findByProperty(TSOperation.class, "TSFunction.id", functionId);
|
||||||
// List<TSOperation> newall = new ArrayList<TSOperation>();
|
// List<TSOperation> newall = new ArrayList<TSOperation>();
|
||||||
|
@ -217,10 +214,10 @@ public class AuthInterceptor implements HandlerInterceptor {
|
||||||
// //s=s.replaceAll(" ", "");
|
// //s=s.replaceAll(" ", "");
|
||||||
// newall.add(s);
|
// newall.add(s);
|
||||||
// }
|
// }
|
||||||
// //---author:jg_xugj----start-----date:20151210--------for:#781 【oracle兼容】兼容问题fun.operation!='' 在oracle 数据下不正确
|
|
||||||
// String hasOperSql="SELECT operation FROM t_s_role_function fun, t_s_role_user role WHERE " +
|
// String hasOperSql="SELECT operation FROM t_s_role_function fun, t_s_role_user role WHERE " +
|
||||||
// "fun.functionid='"+functionId+"' AND fun.operation is not null AND fun.roleid=role.roleid AND role.userid='"+currLoginUser.getId()+"' ";
|
// "fun.functionid='"+functionId+"' AND fun.operation is not null AND fun.roleid=role.roleid AND role.userid='"+currLoginUser.getId()+"' ";
|
||||||
// //---author:jg_xugj----end-----date:20151210--------for:#781 【oracle兼容】兼容问题fun.operation!='' 在oracle 数据下不正确
|
|
||||||
// List<String> hasOperList = this.systemService.findListbySql(hasOperSql);
|
// List<String> hasOperList = this.systemService.findListbySql(hasOperSql);
|
||||||
// for(String operationIds:hasOperList){
|
// for(String operationIds:hasOperList){
|
||||||
// for(String operationId:operationIds.split(",")){
|
// for(String operationId:operationIds.split(",")){
|
||||||
|
@ -246,8 +243,7 @@ public class AuthInterceptor implements HandlerInterceptor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
request.setAttribute(Globals.NOAUTO_OPERATIONCODES, newall);*/
|
request.setAttribute(Globals.NOAUTO_OPERATIONCODES, newall);*/
|
||||||
//update-end--Author:scott Date:20170330 for:[online表单按钮权限\链接]jeecg 统一规则采用反的控制,授权的进行按钮或者字段 隐藏\禁用--------------------
|
|
||||||
//update-end-author:taoYan date:20170814 for:TASK #2207 【权限bug】多个角色权限(并集问题),因为是反的控制,导致有admin的最大权限反而受小权限控制
|
|
||||||
|
|
||||||
//Step.2 第二部分处理列表数据级权限 (菜单数据规则集合)
|
//Step.2 第二部分处理列表数据级权限 (菜单数据规则集合)
|
||||||
List<TSDataRule> MENU_DATA_AUTHOR_RULES = new ArrayList<TSDataRule>();
|
List<TSDataRule> MENU_DATA_AUTHOR_RULES = new ArrayList<TSDataRule>();
|
||||||
|
@ -256,7 +252,7 @@ public class AuthInterceptor implements HandlerInterceptor {
|
||||||
|
|
||||||
//数据权限规则的查询
|
//数据权限规则的查询
|
||||||
//查询所有的当前这个用户所对应的角色和菜单的datarule的数据规则id
|
//查询所有的当前这个用户所对应的角色和菜单的datarule的数据规则id
|
||||||
//update-begin-author:taoYan date:20170829 for:admin不作数据权限控制
|
|
||||||
if(!currLoginUser.getUserName().equals("admin")){
|
if(!currLoginUser.getUserName().equals("admin")){
|
||||||
//Globals.BUTTON_AUTHORITY_CHECK
|
//Globals.BUTTON_AUTHORITY_CHECK
|
||||||
Set<String> dataruleCodes = systemService.getOperationCodesByUserIdAndDataId(currLoginUser.getId(), functionId);
|
Set<String> dataruleCodes = systemService.getOperationCodesByUserIdAndDataId(currLoginUser.getId(), functionId);
|
||||||
|
@ -267,7 +263,7 @@ public class AuthInterceptor implements HandlerInterceptor {
|
||||||
MENU_DATA_AUTHOR_RULE_SQL += SysContextSqlConvert.setSqlModel(dataRule);
|
MENU_DATA_AUTHOR_RULE_SQL += SysContextSqlConvert.setSqlModel(dataRule);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//update-end-author:taoYan date:20170829 for:admin不作数据权限控制
|
|
||||||
JeecgDataAutorUtils.installDataSearchConditon(request, MENU_DATA_AUTHOR_RULES);//菜单数据规则集合
|
JeecgDataAutorUtils.installDataSearchConditon(request, MENU_DATA_AUTHOR_RULES);//菜单数据规则集合
|
||||||
JeecgDataAutorUtils.installDataSearchConditon(request, MENU_DATA_AUTHOR_RULE_SQL);//菜单数据规则sql
|
JeecgDataAutorUtils.installDataSearchConditon(request, MENU_DATA_AUTHOR_RULE_SQL);//菜单数据规则sql
|
||||||
|
|
||||||
|
@ -281,8 +277,7 @@ public class AuthInterceptor implements HandlerInterceptor {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//update-start--author:scott date:20170225 for:重构权限判断,提高效率---------------
|
|
||||||
/**
|
/**
|
||||||
* 判断用户是否有菜单访问权限
|
* 判断用户是否有菜单访问权限
|
||||||
* @param requestPath
|
* @param requestPath
|
||||||
|
@ -292,7 +287,7 @@ public class AuthInterceptor implements HandlerInterceptor {
|
||||||
*/
|
*/
|
||||||
private boolean hasMenuAuth(String requestPath,String clickFunctionId,TSUser currLoginUser){
|
private boolean hasMenuAuth(String requestPath,String clickFunctionId,TSUser currLoginUser){
|
||||||
String userid = currLoginUser.getId();
|
String userid = currLoginUser.getId();
|
||||||
//update-start--author:scott -------- date:20170330 -------- for:菜单访问权限由模糊匹配改成精确匹配TODO ---------------
|
|
||||||
//step.1 先判断请求是否配置菜单,没有配置菜单默认不作权限控制[注意:这里不限制权限类型菜单]
|
//step.1 先判断请求是否配置菜单,没有配置菜单默认不作权限控制[注意:这里不限制权限类型菜单]
|
||||||
String hasMenuSql = "select count(*) from t_s_function where functiontype = 0 and functionurl = '"+requestPath+"'";
|
String hasMenuSql = "select count(*) from t_s_function where functiontype = 0 and functionurl = '"+requestPath+"'";
|
||||||
Long hasMenuCount = systemService.getCountForJdbc(hasMenuSql);
|
Long hasMenuCount = systemService.getCountForJdbc(hasMenuSql);
|
||||||
|
@ -318,9 +313,9 @@ public class AuthInterceptor implements HandlerInterceptor {
|
||||||
}else{
|
}else{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
//update-end--author:scott -------- date:20170330 -------- :菜单访问权限由模糊匹配改成精确匹配TODO ---------------
|
|
||||||
}
|
}
|
||||||
//update-end--author:scott date:20170225 for:重构权限判断,提高效率---------------
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 转发
|
* 转发
|
||||||
|
@ -335,14 +330,14 @@ public class AuthInterceptor implements HandlerInterceptor {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void forward(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
private void forward(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||||
//update-start--Author:scott Date:20160803 for:无登陆情况跳转登陆页
|
|
||||||
//超时,未登陆页面跳转
|
//超时,未登陆页面跳转
|
||||||
//response.sendRedirect(request.getServletContext().getContextPath()+"/loginController.do?login");
|
//response.sendRedirect(request.getServletContext().getContextPath()+"/loginController.do?login");
|
||||||
// update-start--Author:chenjin Date:20160828 for:TASK #1324 【bug】Session超时后,重新登录页面显示在标签里,让它重新显示登录页面
|
|
||||||
response.sendRedirect(request.getSession().getServletContext().getContextPath()+"/webpage/login/timeout.jsp");
|
response.sendRedirect(request.getSession().getServletContext().getContextPath()+"/webpage/login/timeout.jsp");
|
||||||
// update-end--Author:chenjin Date:20160828 for:TASK #1324 【bug】Session超时后,重新登录页面显示在标签里,让它重新显示登录页面
|
|
||||||
//request.getRequestDispatcher("loginController.do?login").forward(request, response);
|
//request.getRequestDispatcher("loginController.do?login").forward(request, response);
|
||||||
//update-start--Author:scott Date:20160803 for:无登陆情况跳转登陆页
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -367,7 +362,7 @@ public class AuthInterceptor implements HandlerInterceptor {
|
||||||
private boolean isAjax(HttpServletRequest request, HttpServletResponse response){
|
private boolean isAjax(HttpServletRequest request, HttpServletResponse response){
|
||||||
return oConvertUtils.isNotEmpty(request.getHeader("X-Requested-With"));
|
return oConvertUtils.isNotEmpty(request.getHeader("X-Requested-With"));
|
||||||
}
|
}
|
||||||
//update-begin--Author:dangzhenghui Date:20170627 for:TASK #2157 【bug】拦截器,需要判断过来的请求是否ajax,如果ajax则返回无权限json,非跳转页面
|
|
||||||
private void processAjax(HttpServletResponse response){
|
private void processAjax(HttpServletResponse response){
|
||||||
AjaxJson json = new AjaxJson();
|
AjaxJson json = new AjaxJson();
|
||||||
json.setSuccess(false);
|
json.setSuccess(false);
|
||||||
|
@ -383,5 +378,5 @@ public class AuthInterceptor implements HandlerInterceptor {
|
||||||
pw.close();
|
pw.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//update-end--Author:dangzhenghui Date:20170627 for:TASK #2157 【bug】拦截器,需要判断过来的请求是否ajax,如果ajax则返回无权限json,非跳转页面
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue