1、遗弃“本地任务”开发模式,推荐使用“远程任务”,易于系统解耦; 2、遗弃“servlet”方式底层系统通讯,推荐使用JETTY方式,重构通讯逻辑; 3、【重要】“远程任务”细分为:BEAN、GLUE两种开发模式,其中GLUE方式“远程任务”的逻辑代码托管至云端,动态编译生效,详情请前往博客查看; 4、UI交互优化:左侧菜单展开状态优化,菜单项选中状态优化,任务列表打开表格有压缩优化;master
parent
83c7e23d77
commit
e6c239eca0
14 changed files with 68 additions and 23 deletions
@ -0,0 +1,34 @@ |
||||
package com.xxl.job.controller.interceptor; |
||||
|
||||
import java.util.HashMap; |
||||
|
||||
import javax.servlet.http.Cookie; |
||||
import javax.servlet.http.HttpServletRequest; |
||||
import javax.servlet.http.HttpServletResponse; |
||||
|
||||
import org.apache.commons.lang.ArrayUtils; |
||||
import org.springframework.web.servlet.ModelAndView; |
||||
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; |
||||
|
||||
/** |
||||
* push cookies to model as cookieMap |
||||
* @author xuxueli 2015-12-12 18:09:04 |
||||
*/ |
||||
public class CookieInterceptor extends HandlerInterceptorAdapter { |
||||
|
||||
@Override |
||||
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, |
||||
ModelAndView modelAndView) throws Exception { |
||||
|
||||
if (modelAndView!=null && ArrayUtils.isNotEmpty(request.getCookies())) { |
||||
HashMap<String, Cookie> cookieMap = new HashMap<String, Cookie>(); |
||||
for (Cookie ck : request.getCookies()) { |
||||
cookieMap.put(ck.getName(), ck); |
||||
} |
||||
modelAndView.addObject("cookieMap", cookieMap); |
||||
} |
||||
|
||||
super.postHandle(request, response, handler, modelAndView); |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue