Polish @CrossOrigin

- origin --> origins
- method --> methods
- constants are now actually constant (i.e., static final)
This commit is contained in:
Sam Brannen
2015-06-13 17:09:58 +02:00
parent 60cdfa535e
commit 2b339db53b
3 changed files with 16 additions and 19 deletions

View File

@@ -39,19 +39,19 @@ import org.springframework.core.annotation.AliasFor;
@Documented
public @interface CrossOrigin {
String[] DEFAULT_ORIGIN = { "*" };
static final String[] DEFAULT_ORIGIN = { "*" };
String[] DEFAULT_ALLOWED_HEADERS = { "*" };
static final String[] DEFAULT_ALLOWED_HEADERS = { "*" };
boolean DEFAULT_ALLOW_CREDENTIALS = true;
static final boolean DEFAULT_ALLOW_CREDENTIALS = true;
long DEFAULT_MAX_AGE = 1800;
static final long DEFAULT_MAX_AGE = 1800;
/**
* Alias for {@link #origin}.
* Alias for {@link #origins}.
*/
@AliasFor(attribute = "origin")
@AliasFor(attribute = "origins")
String[] value() default {};
/**
@@ -63,7 +63,7 @@ public @interface CrossOrigin {
* @see #value
*/
@AliasFor(attribute = "value")
String[] origin() default {};
String[] origins() default {};
/**
* List of request headers that can be used during the actual request.
@@ -88,7 +88,7 @@ public @interface CrossOrigin {
* <p>If undefined, methods defined by {@link RequestMapping} annotation
* are used.
*/
RequestMethod[] method() default {};
RequestMethod[] methods() default {};
/**
* Whether the browser should include any cookies associated with the