Document intention of toString() in HandlerMethod

Document that HandlerMethod.toString() is used in log and error messages,
and that the returned description should typically include the method
signature of the underlying handler method for clarity and debugging.

Closes gh-35055

Signed-off-by: WonYong Hwang <111210881+wonyongg@users.noreply.github.com>
Co-authored-by: Sam Brannen <104798+sbrannen@users.noreply.github.com>
This commit is contained in:
WonYong Hwang
2025-06-18 13:00:44 +02:00
committed by GitHub
co-authored by Sam Brannen
parent a265a135d5
commit 5d0fc72eb2
@@ -352,6 +352,12 @@ public class HandlerMethod extends AnnotatedMethod {
return (this.bean.hashCode() * 31 + super.hashCode());
}
/**
* Returns a concise description of this {@code HandlerMethod}, which is used
* in log and error messages.
* <p>The description should typically include the method signature of the
* underlying handler method for clarity and debugging purposes.
*/
@Override
public String toString() {
return this.description;