<dependency>
<groupId>com.coze</groupId>
<artifactId>coze-api</artifactId>
<version>0.4.2</version>
</dependency>
按照github的示例运行,在以下部分抛出异常
try { OAuthToken resp = oauth.getAccessToken(); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); }
Exception in thread "main" java.lang.NoSuchMethodError: 'io.jsonwebtoken.JwtBuilder io.jsonwebtoken.JwtBuilder.signWith(java.security.Key, io.jsonwebtoken.SignatureAlgorithm)'
at com.coze.openapi.service.auth.DefaultJWTBuilder.generateJWT(DefaultJWTBuilder.java:25)
at com.coze.openapi.service.auth.JWTOAuthClient.doGetAccessToken(JWTOAuthClient.java:114)
at com.coze.openapi.service.auth.JWTOAuthClient.getAccessToken(JWTOAuthClient.java:52)
at com.fx.ai.coze.JWTOAuthExample.main(JWTOAuthExample.java:73)
按照github的示例运行,在以下部分抛出异常
try { OAuthToken resp = oauth.getAccessToken(); System.out.println(resp); } catch (Exception e) { e.printStackTrace(); }Exception in thread "main" java.lang.NoSuchMethodError: 'io.jsonwebtoken.JwtBuilder io.jsonwebtoken.JwtBuilder.signWith(java.security.Key, io.jsonwebtoken.SignatureAlgorithm)'
at com.coze.openapi.service.auth.DefaultJWTBuilder.generateJWT(DefaultJWTBuilder.java:25)
at com.coze.openapi.service.auth.JWTOAuthClient.doGetAccessToken(JWTOAuthClient.java:114)
at com.coze.openapi.service.auth.JWTOAuthClient.getAccessToken(JWTOAuthClient.java:52)
at com.fx.ai.coze.JWTOAuthExample.main(JWTOAuthExample.java:73)