From 45ae47d5cb7f25e950ce4768941c3cc93058bf60 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Thu, 7 Mar 2019 18:13:17 +0100 Subject: [PATCH] Polishing --- .../servlet/handler/BeanNameUrlHandlerMapping.java | 11 +++++------ .../web/servlet/handler/SimpleUrlHandlerMapping.java | 6 +++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/BeanNameUrlHandlerMapping.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/BeanNameUrlHandlerMapping.java index 3ba104594a..64d60327b5 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/BeanNameUrlHandlerMapping.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/BeanNameUrlHandlerMapping.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2019 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. @@ -23,7 +23,7 @@ import org.springframework.util.StringUtils; /** * Implementation of the {@link org.springframework.web.servlet.HandlerMapping} - * interface that map from URLs to beans with names that start with a slash ("/"), + * interface that maps from URLs to beans with names that start with a slash ("/"), * similar to how Struts maps URLs to action names. * *

This is the default implementation used by the @@ -34,11 +34,10 @@ import org.springframework.util.StringUtils; * *

The mapping is from URL to bean name. Thus an incoming URL "/foo" would map * to a handler named "/foo", or to "/foo /foo2" in case of multiple mappings to - * a single handler. Note: In XML definitions, you'll need to use an alias - * name="/foo" in the bean definition, as the XML id may not contain slashes. + * a single handler. * - *

Supports direct matches (given "/test" -> registered "/test") and "*" - * matches (given "/test" -> registered "/t*"). Note that the default is + *

Supports direct matches (given "/test" -> registered "/test") and "*" + * matches (given "/test" -> registered "/t*"). Note that the default is * to map within the current servlet mapping if applicable; see the * {@link #setAlwaysUseFullPath "alwaysUseFullPath"} property for details. * For details on the pattern options, see the diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleUrlHandlerMapping.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleUrlHandlerMapping.java index d3dc5b4cb5..ade7c6d4a5 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleUrlHandlerMapping.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleUrlHandlerMapping.java @@ -27,7 +27,7 @@ import org.springframework.util.CollectionUtils; /** * Implementation of the {@link org.springframework.web.servlet.HandlerMapping} - * interface to map from URLs to request handler beans. Supports both mapping to bean + * interface that maps from URLs to request handler beans. Supports both mapping to bean * instances and mapping to bean names; the latter is required for non-singleton handlers. * *

The "urlMap" property is suitable for populating the handler map with @@ -42,8 +42,8 @@ import org.springframework.util.CollectionUtils; * The syntax is {@code PATH=HANDLER_BEAN_NAME}. * If the path doesn't begin with a slash, one is prepended. * - *

Supports direct matches (given "/test" -> registered "/test") and "*" - * pattern matches (given "/test" -> registered "/t*"). Note that the default + *

Supports direct matches (given "/test" -> registered "/test") and "*" + * pattern matches (given "/test" -> registered "/t*"). Note that the default * is to map within the current servlet mapping if applicable; see the * {@link #setAlwaysUseFullPath "alwaysUseFullPath"} property. For details on the * pattern options, see the {@link org.springframework.util.AntPathMatcher} javadoc.