diff --git a/grails-plugin-controllers/src/main/groovy/grails/artefact/Controller.groovy b/grails-plugin-controllers/src/main/groovy/grails/artefact/Controller.groovy index 206cd7843e..5dcba344c9 100644 --- a/grails-plugin-controllers/src/main/groovy/grails/artefact/Controller.groovy +++ b/grails-plugin-controllers/src/main/groovy/grails/artefact/Controller.groovy @@ -535,4 +535,10 @@ trait Controller implements ResponseRenderer, ResponseRedirector, RequestForward webRequest.setAttribute(GrailsApplicationAttributes.ERRORS, errors, 0) } + @Generated + @Override + String toString() { + getControllerClass()?.fullName + } + } diff --git a/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/mvc/GrailsControllerUrlMappingInfo.groovy b/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/mvc/GrailsControllerUrlMappingInfo.groovy index 9b7ddb2dc6..93a473760e 100644 --- a/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/mvc/GrailsControllerUrlMappingInfo.groovy +++ b/grails-web-url-mappings/src/main/groovy/org/grails/web/mapping/mvc/GrailsControllerUrlMappingInfo.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2014-2022 the original author or authors. + * Copyright 2014-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,4 +35,9 @@ class GrailsControllerUrlMappingInfo implements UrlMappingInfo { this.info = info } + @Override + String toString() { + controllerClass.fullName + '#' + (info.actionName ?: controllerClass.defaultAction) + } + }