From c2f704717ee1425042ebb9937e7b9c74dbd0212e Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Wed, 17 Feb 2016 17:30:57 +0000 Subject: [PATCH] Polish Javadoc for DefaultRequestToViewNameTranslator --- .../DefaultRequestToViewNameTranslator.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/DefaultRequestToViewNameTranslator.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/DefaultRequestToViewNameTranslator.java index dd8b1d3912..1e42bb3b40 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/DefaultRequestToViewNameTranslator.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/DefaultRequestToViewNameTranslator.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2016 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. @@ -24,28 +24,28 @@ import org.springframework.web.servlet.RequestToViewNameTranslator; import org.springframework.web.util.UrlPathHelper; /** - * {@link org.springframework.web.servlet.RequestToViewNameTranslator} - * that simply transforms the URI of the incoming request into a view name. + * {@link RequestToViewNameTranslator} that simply transforms the URI of + * the incoming request into a view name. * - *

Can be explicitly defined as the "viewNameTranslator" bean in a + *

Can be explicitly defined as the {@code viewNameTranslator} bean in a * {@link org.springframework.web.servlet.DispatcherServlet} context. * Otherwise, a plain default instance will be used. * *

The default transformation simply strips leading and trailing slashes * as well as the file extension of the URI, and returns the result as the - * view name with the configured {@link #setPrefix "prefix"} and a - * {@link #setSuffix "suffix"} added as appropriate. + * view name with the configured {@link #setPrefix prefix} and a + * {@link #setSuffix suffix} added as appropriate. * *

The stripping of the leading slash and file extension can be disabled - * using the {@link #setStripLeadingSlash "stripLeadingSlash"} and - * {@link #setStripExtension "stripExtension"} properties, respectively. + * using the {@link #setStripLeadingSlash stripLeadingSlash} and + * {@link #setStripExtension stripExtension} properties, respectively. * *

Find below some examples of request to view name translation. - * - *

http://localhost:8080/gamecast/display.html -> display
- * http://localhost:8080/gamecast/displayShoppingCart.html -> displayShoppingCart
- * http://localhost:8080/gamecast/admin/index.html -> admin/index
- * 
+ * * * @author Rob Harrop * @author Juergen Hoeller