Springboot integrated jwt expiration time error solution

Exception in thread "main" io.jsonwebtoken.ExpiredJwtException: JWT expired at 2021-12-20T10:09:10Z. Current time: 2023-03-23T22:04:32Z, a difference of 39614122266 milliseconds. Allowed clock skew: 0 milliseconds.at io.jsonwebtoken.impl.DefaultJwtParser.parse(DefaultJwtParser.java:385)at io.jsonwebtoken.impl.DefaultJwtParser.parse(DefaultJwtParser.java:481)at io.jsonwebtoken.impl.DefaultJwtParser.parseClaimsJws(DefaultJwtParser.java:541)at com.sangeng.utils.JwtUtil.parseJWT(JwtUtil.java:110)at com.sangeng.utils.JwtUtil.main(JwtUtil.java:83) 错误解决方法!

JWT expired at 2021-12-20T10:09:10Z. Current time: 2023-03-23T22:04:32Z, a difference of means that jwt has reached the expiration time

The error location is located in the following figure:

Solution: Reacquire the encrypted id of jwt, and then fill in the corresponding position

        String jwt = createJWT("2123"); 
        System.out.println(jwt);

Guess you like

Origin blog.csdn.net/qq_60870118/article/details/129740819