lee1177的博客
lee1177 · 共 19 篇文章
spring mvc 几种数据绑定
收集spring mvc 几种数据绑定,记录备用 org.springframework.beans.PropertyEditorRegistrySupport.java [java] view plain copy /** * Actually register the default editors for this registry instance. */ private void doRegisterDefaultEditors() { this.defaultEditors = new HashMap<Class, PropertyEditor>(64); // Simple e…
2012-07-23 15:24 · 评论(0)
jquery flot x轴时间差8小时问题
使用flot时x轴为时间数据从后台传时间过来,但现实后发现显示的是UTC时间,跟本地时间差8小时,查了下资料用tickFormatter解决了。 var options = { lines: { show: true }, points: { show: true }, grid: { hoverable: true}, xaxis: { mode: "time", timeformat: "%H:%M:%S", tickFormatter: function (val, axis) { var d = new Date(val); return d.toLocaleTimeString()…
2012-06-20 10:56 · 评论(0)
spring security 基于FilterSecurityInterceptor过滤链中增加SSO单点登录
目前我们的项目中使用基于基于FilterSecurityInterceptor过滤链对系统资web资源进行保护,升级ss3后发现原来使用的filter的SSO登录方式不再适用。 昨天研究FilterSecurityInterceptor源码发现其实这个实现其实很简单,发出来分享下。 分析: 我们一般在过滤链时使用实现AbstractSecurityInterceptor构成整个链,AbstractSecurityInterceptor的机制可以分为几个步骤: 1、事前评估--检查请求资源是否为受保护资源; 2、查找认证--当前安全上下文中是否是通过安全认证的用户; 3、认证用户--查找认证时…
2012-06-01 09:48 · 评论(2)
jquery+struts2传值及异常处理
最近项目使用jquery+strtus2的交互方式。之前对于传值和异常处理没有统一的规范,现在整理了一下感觉清晰很多,记录下来。 首先是ACTION方法 /** * 获取角色列表JSON * @Methods Name getRoleListJson * @Create In May 26, 2011 By lee void */ public void getRoleListJson(){ String json = null; try{ HttpServletRequest request = super.getRequest(); QueryParam queryParam = Htt…
2011-08-09 14:10 · 评论(0)