session是否过期

xiaoxiao2021-02-28  9

public boolean isValid() { try { return (session != null && (System.currentTimeMillis() - session.getLastAccessedTime()) / 1000 < session.getMaxInactiveInterval()); } catch (Exception e) { return false; } }

getLastAccessedTime : 客户端最近一次发请求的时间




FR:海涛高软(hunk Xu)

转载请注明原文地址: https://www.6miu.com/read-750319.html

最新回复(0)