Skip to content

Commit

Permalink
Add warning message on deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
jdaugherty committed Dec 1, 2024
1 parent 81f165f commit 38ef71d
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
import grails.core.GrailsApplication;
import grails.web.mapping.UrlMappingInfo;
import grails.web.mapping.exceptions.UrlMappingException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.grails.web.servlet.mvc.GrailsWebRequest;
import org.grails.web.util.WebUtils;
import org.springframework.context.ApplicationContext;
Expand All @@ -49,6 +51,7 @@
*/
public class DefaultUrlMappingInfo extends AbstractUrlMappingInfo {

private static final Log LOG = LogFactory.getLog(DefaultUrlMappingInfo.class);
private static final String SETTING_GRAILS_WEB_DISABLE_MULTIPART = "grails.web.disable.multipart";
private static final String CONTROLLER_PREFIX = "controller:";
private static final String ACTION_PREFIX = "action:";
Expand Down Expand Up @@ -238,6 +241,11 @@ private String checkDispatchAction(HttpServletRequest request) {
break;
}
}

if (LOG.isWarnEnabled() && dispatchActionName != null) {
LOG.warn(String.format("Dispatch Action [%s] detected; Dispatch Actions will be removed in a future version of Grails.", dispatchActionName));
}

return dispatchActionName;
}

Expand Down

0 comments on commit 38ef71d

Please sign in to comment.