Update @RestController javadoc
Issue: SPR-13945
This commit is contained in:
@@ -29,10 +29,10 @@ import org.springframework.core.annotation.AliasFor;
|
||||
*
|
||||
* <p>By default, all origins and headers are permitted.
|
||||
*
|
||||
* <p><b>NOTE:</b> {@code @CrossOrigin} will only be processed if an appropriate
|
||||
* <p><b>NOTE:</b> {@code @CrossOrigin} is processed if an appropriate
|
||||
* {@code HandlerMapping}-{@code HandlerAdapter} pair is configured such as the
|
||||
* {@code RequestMappingHandlerMapping}-{@code RequestMappingHandlerAdapter} pair
|
||||
* which are the default in the MVC Java config and the MVC namespace.
|
||||
* {@code RequestMappingHandlerMapping}-{@code RequestMappingHandlerAdapter}
|
||||
* pair which are the default in the MVC Java config and the MVC namespace.
|
||||
* In particular {@code @CrossOrigin} is not supported with the
|
||||
* {@code DefaultAnnotationHandlerMapping}-{@code AnnotationMethodHandlerAdapter}
|
||||
* pair both of which are also deprecated.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 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.
|
||||
@@ -25,13 +25,21 @@ import java.lang.annotation.Target;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
||||
/**
|
||||
* A convenience annotation that is itself annotated with {@link Controller @Controller}
|
||||
* and {@link ResponseBody @ResponseBody}.
|
||||
* A convenience annotation that is itself annotated with
|
||||
* {@link Controller @Controller} and {@link ResponseBody @ResponseBody}.
|
||||
* <p>
|
||||
* Types that carry this annotation are treated as controllers where
|
||||
* {@link RequestMapping @RequestMapping} methods assume
|
||||
* {@link ResponseBody @ResponseBody} semantics by default.
|
||||
*
|
||||
* <p><b>NOTE:</b> {@code @RestController} is processed if an appropriate
|
||||
* {@code HandlerMapping}-{@code HandlerAdapter} pair is configured such as the
|
||||
* {@code RequestMappingHandlerMapping}-{@code RequestMappingHandlerAdapter}
|
||||
* pair which are the default in the MVC Java config and the MVC namespace.
|
||||
* In particular {@code @RestController} is not supported with the
|
||||
* {@code DefaultAnnotationHandlerMapping}-{@code AnnotationMethodHandlerAdapter}
|
||||
* pair both of which are also deprecated.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @author Sam Brannen
|
||||
* @since 4.0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 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.
|
||||
@@ -34,6 +34,14 @@ import org.springframework.core.annotation.AliasFor;
|
||||
* {@link ExceptionHandler @ExceptionHandler} methods assume
|
||||
* {@link ResponseBody @ResponseBody} semantics by default.
|
||||
*
|
||||
* <p><b>NOTE:</b> {@code @RestControllerAdvice} is processed if an appropriate
|
||||
* {@code HandlerMapping}-{@code HandlerAdapter} pair is configured such as the
|
||||
* {@code RequestMappingHandlerMapping}-{@code RequestMappingHandlerAdapter} pair
|
||||
* which are the default in the MVC Java config and the MVC namespace.
|
||||
* In particular {@code @RestControllerAdvice} is not supported with the
|
||||
* {@code DefaultAnnotationHandlerMapping}-{@code AnnotationMethodHandlerAdapter}
|
||||
* pair both of which are also deprecated.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 4.3
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user