@Override
 public boolean preHandle(HttpServletRequest req, HttpServletResponse response, Object arg2)
     throws Exception {
   logger.info("preHandle uri : {}, method : {}", req.getRequestURI(), req.getMethod());
   UserProfile userprofile = (UserProfile) req.getSession().getAttribute("userprofile");
   // Assert.notNull(userprofile, "请登陆");
   if (userprofile == null
       || userprofile.isPlatformUser()
       || userprofile instanceof GuestProfile) {
     response.sendRedirect("/" + req.getContextPath());
     return false;
   }
   return true;
 }