Skip to content

补充Jackson NoSuchMethodError问题解决方案 #128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 1, 2022

Conversation

lianup
Copy link
Contributor

@lianup lianup commented Mar 31, 2022

No description provided.

README.md Outdated
```

如果出现其他依赖的`NoSuchMethodError`报错,可以根据是否有引入依赖,是否使用了版本较低的依赖,是否有依赖冲突的思路排查。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这句话也有点不清楚。表现形式建议改成用列表,按步骤会更清晰

  1. 确认报错方法所属的组件,以及组件的版本要求
  2. 使用xx工具确定构建时引用的版本号
  3. 使用上面的方式指定模块的版本

(以上只是大纲,文字还可以再打磨下)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改,可以再看下

README.md Outdated
如果出现其他组件的 `NoSuchMethodError` 报错,一般是依赖冲突导致。我们可以参考下面的解决思路:
1. 从报错信息中找到出现问题的组件(如上面的 Jackson )。根据你的项目的构建方式,选择 [Gradle](https://docs.gradle.org/current/userguide/viewing_debugging_dependencies.html#sec:listing_dependencies) 或 [Maven](https://maven.apache.org/plugins/maven-dependency-plugin/tree-mojo.html) 工具列出项目的依赖关系树,找到问题组件的所有版本号。
2. 从报错信息中找到正确的组件版本号。一般来说,导致报错的原因是使用的组件版本太低,所以我们可以找组件在依赖关系树中最新的版本号。
3. 使用上面的方式指定组件版本。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我觉得“上面”的指代有点模糊

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改

@lianup lianup merged commit 55e4159 into wechatpay-apiv3:master Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants