mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:39:29 +00:00
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:
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;
|
||||
|
||||
Reference in New Issue
Block a user