Polishing
This commit is contained in:
@@ -88,42 +88,42 @@ public class HttpHeaders implements MultiValueMap<String, String>, Serializable
|
||||
public static final String ACCEPT_RANGES = "Accept-Ranges";
|
||||
/**
|
||||
* The CORS {@code Access-Control-Allow-Credentials} response header field name.
|
||||
* @see <a href="http://www.w3.org/TR/cors/">CORS W3C recommandation</a>
|
||||
* @see <a href="http://www.w3.org/TR/cors/">CORS W3C recommendation</a>
|
||||
*/
|
||||
public static final String ACCESS_CONTROL_ALLOW_CREDENTIALS = "Access-Control-Allow-Credentials";
|
||||
/**
|
||||
* The CORS {@code Access-Control-Allow-Headers} response header field name.
|
||||
* @see <a href="http://www.w3.org/TR/cors/">CORS W3C recommandation</a>
|
||||
* @see <a href="http://www.w3.org/TR/cors/">CORS W3C recommendation</a>
|
||||
*/
|
||||
public static final String ACCESS_CONTROL_ALLOW_HEADERS = "Access-Control-Allow-Headers";
|
||||
/**
|
||||
* The CORS {@code Access-Control-Allow-Methods} response header field name.
|
||||
* @see <a href="http://www.w3.org/TR/cors/">CORS W3C recommandation</a>
|
||||
* @see <a href="http://www.w3.org/TR/cors/">CORS W3C recommendation</a>
|
||||
*/
|
||||
public static final String ACCESS_CONTROL_ALLOW_METHODS = "Access-Control-Allow-Methods";
|
||||
/**
|
||||
* The CORS {@code Access-Control-Allow-Origin} response header field name.
|
||||
* @see <a href="http://www.w3.org/TR/cors/">CORS W3C recommandation</a>
|
||||
* @see <a href="http://www.w3.org/TR/cors/">CORS W3C recommendation</a>
|
||||
*/
|
||||
public static final String ACCESS_CONTROL_ALLOW_ORIGIN = "Access-Control-Allow-Origin";
|
||||
/**
|
||||
* The CORS {@code Access-Control-Expose-Headers} response header field name.
|
||||
* @see <a href="http://www.w3.org/TR/cors/">CORS W3C recommandation</a>
|
||||
* @see <a href="http://www.w3.org/TR/cors/">CORS W3C recommendation</a>
|
||||
*/
|
||||
public static final String ACCESS_CONTROL_EXPOSE_HEADERS = "Access-Control-Expose-Headers";
|
||||
/**
|
||||
* The CORS {@code Access-Control-Max-Age} response header field name.
|
||||
* @see <a href="http://www.w3.org/TR/cors/">CORS W3C recommandation</a>
|
||||
* @see <a href="http://www.w3.org/TR/cors/">CORS W3C recommendation</a>
|
||||
*/
|
||||
public static final String ACCESS_CONTROL_MAX_AGE = "Access-Control-Max-Age";
|
||||
/**
|
||||
* The CORS {@code Access-Control-Request-Headers} request header field name.
|
||||
* @see <a href="http://www.w3.org/TR/cors/">CORS W3C recommandation</a>
|
||||
* @see <a href="http://www.w3.org/TR/cors/">CORS W3C recommendation</a>
|
||||
*/
|
||||
public static final String ACCESS_CONTROL_REQUEST_HEADERS = "Access-Control-Request-Headers";
|
||||
/**
|
||||
* The CORS {@code Access-Control-Request-Method} request header field name.
|
||||
* @see <a href="http://www.w3.org/TR/cors/">CORS W3C recommandation</a>
|
||||
* @see <a href="http://www.w3.org/TR/cors/">CORS W3C recommendation</a>
|
||||
*/
|
||||
public static final String ACCESS_CONTROL_REQUEST_METHOD = "Access-Control-Request-Method";
|
||||
/**
|
||||
|
||||
@@ -253,7 +253,7 @@ Similarly, one can force a `UrlResource` to be used by specifying any of the sta
|
||||
Resource template = ctx.getResource("http://myhost.com/resource/path/myTemplate.txt");
|
||||
----
|
||||
|
||||
The following table summarizes the strategy for converting ++String++s to ++Resource++s:
|
||||
The following table summarizes the strategy for converting ``String``s to ``Resource``s:
|
||||
|
||||
[[resources-resource-strings]]
|
||||
.Resource strings
|
||||
@@ -492,10 +492,10 @@ When the path location contains an Ant-style pattern, for example:
|
||||
classpath:com/mycompany/**/applicationContext.xml
|
||||
----
|
||||
|
||||
... the resolver follows a more complex but defined procedure to try to resolve the
|
||||
The resolver follows a more complex but defined procedure to try to resolve the
|
||||
wildcard. It produces a Resource for the path up to the last non-wildcard segment and
|
||||
obtains a URL from it. If this URL is not a "jar:" URL or container-specific variant
|
||||
(e.g. " `zip:`" in WebLogic, " `wsjar`" in WebSphere, etc.), then a `java.io.File` is
|
||||
obtains a URL from it. If this URL is not a `jar:` URL or container-specific variant
|
||||
(e.g. `zip:` in WebLogic, `wsjar` in WebSphere, etc.), then a `java.io.File` is
|
||||
obtained from it and used to resolve the wildcard by traversing the filesystem. In the
|
||||
case of a jar URL, the resolver either gets a `java.net.JarURLConnection` from it or
|
||||
manually parses the jar URL and then traverses the contents of the jar file to resolve
|
||||
@@ -555,9 +555,9 @@ inappropriate result is returned, check the application server documentation for
|
||||
settings that might affect the classloader behavior.
|
||||
====
|
||||
|
||||
The " `classpath*:`" prefix can also be combined with a `PathMatcher` pattern in the
|
||||
rest of the location path, for example " `classpath*:META-INF/*-beans.xml`". In this
|
||||
case, the resolution strategy is fairly simple: a ClassLoader.getResources() call is
|
||||
The `classpath*:` prefix can also be combined with a `PathMatcher` pattern in the
|
||||
rest of the location path, for example `classpath*:META-INF/*-beans.xml`. In this
|
||||
case, the resolution strategy is fairly simple: a `ClassLoader.getResources()` call is
|
||||
used on the last non-wildcard path segment to get all the matching resources in the
|
||||
class loader hierarchy, and then off each resource the same PathMatcher resolution
|
||||
strategy described above is used for the wildcard subpath.
|
||||
@@ -567,13 +567,13 @@ strategy described above is used for the wildcard subpath.
|
||||
==== Other notes relating to wildcards
|
||||
Please note that `classpath*:` when combined with Ant-style patterns will only work
|
||||
reliably with at least one root directory before the pattern starts, unless the actual
|
||||
target files reside in the file system. This means that a pattern like "
|
||||
`classpath*:*.xml`" will not retrieve files from the root of jar files but rather only
|
||||
target files reside in the file system. This means that a pattern like
|
||||
`classpath*:*.xml` will not retrieve files from the root of jar files but rather only
|
||||
from the root of expanded directories. This originates from a limitation in the JDK's
|
||||
`ClassLoader.getResources()` method which only returns file system locations for a
|
||||
passed-in empty string (indicating potential roots to search).
|
||||
|
||||
Ant-style patterns with " `classpath:`" resources are not guaranteed to find matching
|
||||
Ant-style patterns with `classpath:` resources are not guaranteed to find matching
|
||||
resources if the root package to search is available in multiple class path locations.
|
||||
This is because a resource such as
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ and use it like so:
|
||||
}
|
||||
if (!addressValidator.supports(Address.class)) {
|
||||
throw new IllegalArgumentException("The supplied [Validator] must " +
|
||||
support the validation of [Address] instances.");
|
||||
"support the validation of [Address] instances.");
|
||||
}
|
||||
this.addressValidator = addressValidator;
|
||||
}
|
||||
@@ -349,7 +349,7 @@ the properties of instantiated `Companies` and `Employees`:
|
||||
Spring uses the concept of `PropertyEditors` to effect the conversion between an
|
||||
`Object` and a `String`. If you think about it, it sometimes might be handy to be able
|
||||
to represent properties in a different way than the object itself. For example, a `Date`
|
||||
can be represented in a human readable way (as the `String` ' `2007-14-09`'), while
|
||||
can be represented in a human readable way (as the `String` `'2007-14-09'`), while
|
||||
we're still able to convert the human readable form back to the original date (or even
|
||||
better: convert any date entered in a human readable form, back to `Date` objects). This
|
||||
behavior can be achieved by __registering custom editors__, of type
|
||||
@@ -1317,7 +1317,7 @@ See <<mvc-config-conversion>> in the Spring MVC chapter.
|
||||
[[format-configuring-formatting-globaldatetimeformat]]
|
||||
== Configuring a global date & time format
|
||||
By default, date and time fields that are not annotated with `@DateTimeFormat` are
|
||||
converted from strings using the the `DateFormat.SHORT` style. If you prefer, you can
|
||||
converted from strings using the `DateFormat.SHORT` style. If you prefer, you can
|
||||
change this by defining your own global format.
|
||||
|
||||
You will need to ensure that Spring does not register default formatters, and instead
|
||||
|
||||
Reference in New Issue
Block a user