I found that when the RequestBodyAdvice is working, the supports method will be executed twice to determine whether it is applicable to the beforeBodyRead and afterBodyRead methods, but sometimes such a judgment is not necessary, so I think it should be split for different judgments, so I put RequestBodyAdvice The .supports method is divided into beforeBodySupport and afterBodySupport methods
Comment From: snicoll
@selfcoders thanks for the PR but please stop creating duplicates PRs for the same issue. It is possible to amend your PR if you need to.
Comment From: selfcoders
@selfcoders thanks for the PR but please stop creating duplicates PRs for the same issue. It is possible to amend your PR if you need to.
Sorry this is my mistake
Comment From: selfcoders
The first push modification was just a method split, and the second push modification added new parameters to the original method.
Comment From: bclozel
This change breaks compatibility and doesn't help with performance - it actually makes things worse by calling the same method twice where instead we had a single call previously. This change might improve things for a custom implementation of yours, but I don't think that breaking the contract and hinder performance for most Spring applications out there is an acceptable tradeoff.
I'm declining this PR as a result. Thanks for your contribution!