public static String getToken(HttpSession session) {
        String token = null;

        synchronized (session) {
            token = (String) session.getAttribute(CSRF_TOKEN_FOR_SESSION_ATTR_NAME);
            if (null == token) {
                token = UUID.randomUUID().toString();
                session.setAttribute(CSRF_TOKEN_FOR_SESSION_ATTR_NAME, token);
            }
        }
        return token;
    }
@author Robert HG (254963746@qq.com) on 11/10/15.
lts-admin/src/main/java/com/github/ltsopensource/admin/web/support/csrf/CSRFTokenManager.java