|
|
@@ -20,7 +20,6 @@ import com.uas.sso.SSOHelper;
|
|
|
import com.uas.sso.SSOToken;
|
|
|
import com.uas.sso.entity.UserAccount;
|
|
|
import com.uas.sso.entity.UserSpaceView;
|
|
|
-import com.uas.sso.entity.UserView;
|
|
|
import com.uas.sso.util.AccountUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.log4j.Logger;
|
|
|
@@ -33,12 +32,15 @@ import org.springframework.mobile.device.site.SitePreference;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.ui.ModelMap;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
+import org.springframework.web.bind.WebDataBinder;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import javax.servlet.http.HttpSession;
|
|
|
+import java.beans.PropertyEditorSupport;
|
|
|
import java.io.IOException;
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
|
@@ -216,6 +218,19 @@ public class SecurityController {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
+ @InitBinder
|
|
|
+ public void InitBinder(WebDataBinder dataBinder) {
|
|
|
+ /*SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ dateFormat.setLenient(false);
|
|
|
+ dataBinder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));*/
|
|
|
+ dataBinder.registerCustomEditor(Date.class, new PropertyEditorSupport() {
|
|
|
+ @Override
|
|
|
+ public void setAsText(String value) {
|
|
|
+ setValue(new Date(Long.valueOf(value)));
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 其他地点登录后 同步登录状态
|
|
|
* @param request
|