From 0b64bcd319abf39be435dd7b631c2045d60a8039 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Tue, 12 Jun 2018 11:28:13 +0200 Subject: [PATCH] Remove outdated Servlet environment constraints from annotation javadoc Issue: SPR-16936 --- .../web/bind/annotation/ExceptionHandler.java | 7 +++---- .../web/bind/annotation/MatrixVariable.java | 4 ++-- .../web/bind/annotation/PathVariable.java | 5 ++--- .../web/bind/annotation/RequestBody.java | 4 ++-- .../web/bind/annotation/RequestMapping.java | 10 +++++----- .../web/bind/annotation/ResponseBody.java | 4 ++-- 6 files changed, 16 insertions(+), 18 deletions(-) diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/ExceptionHandler.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/ExceptionHandler.java index 943b81995c..e5b65b1fd2 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/annotation/ExceptionHandler.java +++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/ExceptionHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2018 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. @@ -91,9 +91,8 @@ import java.lang.annotation.Target; * (not declaring a response argument in the handler method signature). * * - *

In Servlet environments, you can combine the {@code ExceptionHandler} annotation - * with {@link ResponseStatus @ResponseStatus}, to define the response status - * for the HTTP response. + *

You may combine the {@code ExceptionHandler} annotation with + * {@link ResponseStatus @ResponseStatus} for a specific HTTP error status. * * @author Arjen Poutsma * @author Juergen Hoeller diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/MatrixVariable.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/MatrixVariable.java index d531c40fcb..f915b26aa7 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/annotation/MatrixVariable.java +++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/MatrixVariable.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2018 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. @@ -27,7 +27,7 @@ import org.springframework.core.annotation.AliasFor; /** * Annotation which indicates that a method parameter should be bound to a * name-value pair within a path segment. Supported for {@link RequestMapping} - * annotated handler methods in Servlet environments. + * annotated handler methods. * *

If the method parameter type is {@link java.util.Map} and a matrix variable * name is specified, then the matrix variable value is converted to a diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/PathVariable.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/PathVariable.java index 7485e10d96..ac8345448b 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/annotation/PathVariable.java +++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/PathVariable.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2018 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. @@ -26,8 +26,7 @@ import org.springframework.core.annotation.AliasFor; /** * Annotation which indicates that a method parameter should be bound to a URI template - * variable. Supported for {@link RequestMapping} annotated handler methods in Servlet - * environments. + * variable. Supported for {@link RequestMapping} annotated handler methods. * *

If the method parameter is {@link java.util.Map Map<String, String>} * then the map is populated with all path variable names and values. diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestBody.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestBody.java index 08d830fc20..ce0c8c2787 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestBody.java +++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestBody.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2018 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. @@ -30,7 +30,7 @@ import org.springframework.http.converter.HttpMessageConverter; * method argument depending on the content type of the request. Optionally, automatic * validation can be applied by annotating the argument with {@code @Valid}. * - *

Supported for annotated handler methods in Servlet environments. + *

Supported for annotated handler methods. * * @author Arjen Poutsma * @since 3.0 diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestMapping.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestMapping.java index 16aec34610..70b7b42f95 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestMapping.java +++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestMapping.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 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. @@ -99,11 +99,11 @@ public @interface RequestMapping { String[] value() default {}; /** - * In a Servlet environment only: the path mapping URIs (e.g. "/myPath.do"). + * The path mapping URIs (e.g. "/myPath.do"). * Ant-style path patterns are also supported (e.g. "/myPath/*.do"). - * At the method level, relative paths (e.g. "edit.do") are supported within - * the primary mapping expressed at the type level. Path mapping URIs may - * contain placeholders (e.g. "/${connect}") + * At the method level, relative paths (e.g. "edit.do") are supported + * within the primary mapping expressed at the type level. + * Path mapping URIs may contain placeholders (e.g. "/${connect}"). *

Supported at the type level as well as at the method level! * When used at the type level, all method-level mappings inherit * this primary mapping, narrowing it for a specific handler method. diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/ResponseBody.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/ResponseBody.java index 3f7f19c1d2..fb7805bc7c 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/annotation/ResponseBody.java +++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/ResponseBody.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2018 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,7 +24,7 @@ import java.lang.annotation.Target; /** * Annotation that indicates a method return value should be bound to the web - * response body. Supported for annotated handler methods in Servlet environments. + * response body. Supported for annotated handler methods. * *

As of version 4.0 this annotation can also be added on the type level in * which case it is inherited and does not need to be added on the method level.