Polishing (in particular updating javadoc references to Apache Commons)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2015 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.
|
||||
@@ -29,10 +29,10 @@ import org.springframework.remoting.support.RemoteInvocationResult;
|
||||
* <p>Two implementations are provided out of the box:
|
||||
* <ul>
|
||||
* <li><b>{@code SimpleHttpInvokerRequestExecutor}:</b>
|
||||
* Uses J2SE facilities to execute POST requests, without support
|
||||
* Uses JDK facilities to execute POST requests, without support
|
||||
* for HTTP authentication or advanced configuration options.
|
||||
* <li><b>{@code HttpComponentsHttpInvokerRequestExecutor}:</b>
|
||||
* Uses Jakarta's Commons HttpClient to execute POST requests,
|
||||
* Uses Apache's Commons HttpClient to execute POST requests,
|
||||
* allowing to use a preconfigured HttpClient instance
|
||||
* (potentially with authentication, HTTP connection pooling, etc).
|
||||
* </ul>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2015 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,10 @@ import javax.servlet.http.HttpServletRequest;
|
||||
*
|
||||
* <p>There are two concrete implementations included in Spring, as of Spring 3.1:
|
||||
* <ul>
|
||||
* <li>{@link org.springframework.web.multipart.commons.CommonsMultipartResolver} for Jakarta Commons FileUpload
|
||||
* <li>{@link org.springframework.web.multipart.support.StandardServletMultipartResolver} for Servlet 3.0 Part API
|
||||
* <li>{@link org.springframework.web.multipart.commons.CommonsMultipartResolver}
|
||||
* for Apache Commons FileUpload
|
||||
* <li>{@link org.springframework.web.multipart.support.StandardServletMultipartResolver}
|
||||
* for the Servlet 3.0+ Part API
|
||||
* </ul>
|
||||
*
|
||||
* <p>There is no default resolver implementation used for Spring
|
||||
@@ -38,14 +40,11 @@ import javax.servlet.http.HttpServletRequest;
|
||||
* application context. Such a resolver gets applied to all requests handled
|
||||
* by that {@link org.springframework.web.servlet.DispatcherServlet}.
|
||||
*
|
||||
* <p>If a {@link org.springframework.web.servlet.DispatcherServlet} detects
|
||||
* a multipart request, it will resolve it via the configured
|
||||
* {@link MultipartResolver} and pass on a
|
||||
* wrapped {@link javax.servlet.http.HttpServletRequest}.
|
||||
* Controllers can then cast their given request to the
|
||||
* {@link MultipartHttpServletRequest}
|
||||
* interface, which permits access to any
|
||||
* {@link MultipartFile MultipartFiles}.
|
||||
* <p>If a {@link org.springframework.web.servlet.DispatcherServlet} detects a
|
||||
* multipart request, it will resolve it via the configured {@link MultipartResolver}
|
||||
* and pass on a wrapped {@link javax.servlet.http.HttpServletRequest}. Controllers
|
||||
* can then cast their given request to the {@link MultipartHttpServletRequest}
|
||||
* interface, which allows for access to any {@link MultipartFile MultipartFiles}.
|
||||
* Note that this cast is only supported in case of an actual multipart request.
|
||||
*
|
||||
* <pre class="code">
|
||||
@@ -58,23 +57,19 @@ import javax.servlet.http.HttpServletRequest;
|
||||
* Instead of direct access, command or form controllers can register a
|
||||
* {@link org.springframework.web.multipart.support.ByteArrayMultipartFileEditor}
|
||||
* or {@link org.springframework.web.multipart.support.StringMultipartFileEditor}
|
||||
* with their data binder, to automatically apply multipart content to command
|
||||
* with their data binder, to automatically apply multipart content to form
|
||||
* bean properties.
|
||||
*
|
||||
* <p>As an alternative to using a
|
||||
* {@link MultipartResolver} with a
|
||||
* <p>As an alternative to using a {@link MultipartResolver} with a
|
||||
* {@link org.springframework.web.servlet.DispatcherServlet},
|
||||
* a {@link org.springframework.web.multipart.support.MultipartFilter} can be
|
||||
* registered in {@code web.xml}. It will delegate to a corresponding
|
||||
* {@link MultipartResolver} bean in the root
|
||||
* application context. This is mainly intended for applications that do not
|
||||
* use Spring's own web MVC framework.
|
||||
* {@link MultipartResolver} bean in the root application context. This is mainly
|
||||
* intended for applications that do not use Spring's own web MVC framework.
|
||||
*
|
||||
* <p>Note: There is hardly ever a need to access the
|
||||
* {@link MultipartResolver} itself
|
||||
* from application code. It will simply do its work behind the scenes,
|
||||
* making
|
||||
* {@link MultipartHttpServletRequest MultipartHttpServletRequests}
|
||||
* <p>Note: There is hardly ever a need to access the {@link MultipartResolver}
|
||||
* itself from application code. It will simply do its work behind the scenes,
|
||||
* making {@link MultipartHttpServletRequest MultipartHttpServletRequests}
|
||||
* available to controllers.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
@@ -101,8 +96,8 @@ public interface MultipartResolver {
|
||||
/**
|
||||
* Parse the given HTTP request into multipart files and parameters,
|
||||
* and wrap the request inside a
|
||||
* {@link org.springframework.web.multipart.MultipartHttpServletRequest} object
|
||||
* that provides access to file descriptors and makes contained
|
||||
* {@link org.springframework.web.multipart.MultipartHttpServletRequest}
|
||||
* object that provides access to file descriptors and makes contained
|
||||
* parameters accessible via the standard ServletRequest methods.
|
||||
* @param request the servlet request to wrap (must be of a multipart content type)
|
||||
* @return the wrapped servlet request
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2015 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.
|
||||
@@ -39,7 +39,7 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.util.WebUtils;
|
||||
|
||||
/**
|
||||
* Base class for multipart resolvers that use Jakarta Commons FileUpload
|
||||
* Base class for multipart resolvers that use Apache Commons FileUpload
|
||||
* 1.2 or above.
|
||||
*
|
||||
* <p>Provides common configuration properties and parsing functionality
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2015 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.
|
||||
@@ -31,7 +31,7 @@ import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* MultipartFile implementation for Jakarta Commons FileUpload.
|
||||
* MultipartFile implementation for Apache Commons FileUpload.
|
||||
*
|
||||
* @author Trevor D. Cook
|
||||
* @author Juergen Hoeller
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2015 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.
|
||||
@@ -37,8 +37,8 @@ import org.springframework.web.multipart.support.DefaultMultipartHttpServletRequ
|
||||
import org.springframework.web.util.WebUtils;
|
||||
|
||||
/**
|
||||
* Servlet-based {@link org.springframework.web.multipart.MultipartResolver} implementation
|
||||
* for <a href="http://jakarta.apache.org/commons/fileupload">Jakarta Commons FileUpload</a>
|
||||
* Servlet-based {@link MultipartResolver} implementation for
|
||||
* <a href="http://commons.apache.org/proper/commons-fileupload">Apache Commons FileUpload</a>
|
||||
* 1.2 or above.
|
||||
*
|
||||
* <p>Provides "maxUploadSize", "maxInMemorySize" and "defaultEncoding" settings as
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* MultipartResolver implementation for
|
||||
* <a href="http://jakarta.apache.org/commons/fileupload">Jakarta Commons FileUpload</a>.
|
||||
* <a href="http://commons.apache.org/proper/commons-fileupload">Apache Commons FileUpload</a>.
|
||||
*/
|
||||
package org.springframework.web.multipart.commons;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2015 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.util.Assert;
|
||||
* <a href="http://www.w3.org/TR/html4/charset.html">http://www.w3.org/TR/html4/charset.html</a>
|
||||
*
|
||||
* <p>For a comprehensive set of String escaping utilities,
|
||||
* consider Jakarta Commons Lang and its StringEscapeUtils class.
|
||||
* consider Apache Commons Lang and its StringEscapeUtils class.
|
||||
* We are not using that class here to avoid a runtime dependency
|
||||
* on Commons Lang just for HTML escaping. Furthermore, Spring's
|
||||
* HTML escaping is more flexible and 100% HTML 4.0 compliant.
|
||||
|
||||
@@ -135,7 +135,7 @@ public class UriComponentsBuilder implements Cloneable {
|
||||
// Factory methods
|
||||
|
||||
/**
|
||||
* Returns a new, empty builder.
|
||||
* Create a new, empty builder.
|
||||
* @return the new {@code UriComponentsBuilder}
|
||||
*/
|
||||
public static UriComponentsBuilder newInstance() {
|
||||
@@ -143,7 +143,7 @@ public class UriComponentsBuilder implements Cloneable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a builder that is initialized with the given path.
|
||||
* Create a builder that is initialized with the given path.
|
||||
* @param path the path to initialize with
|
||||
* @return the new {@code UriComponentsBuilder}
|
||||
*/
|
||||
@@ -154,7 +154,7 @@ public class UriComponentsBuilder implements Cloneable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a builder that is initialized with the given {@code URI}.
|
||||
* Create a builder that is initialized with the given {@code URI}.
|
||||
* @param uri the URI to initialize with
|
||||
* @return the new {@code UriComponentsBuilder}
|
||||
*/
|
||||
@@ -165,7 +165,7 @@ public class UriComponentsBuilder implements Cloneable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a builder that is initialized with the given URI string.
|
||||
* Create a builder that is initialized with the given URI string.
|
||||
* <p><strong>Note:</strong> The presence of reserved characters can prevent
|
||||
* correct parsing of the URI string. For example if a query parameter
|
||||
* contains {@code '='} or {@code '&'} characters, the query string cannot
|
||||
@@ -225,7 +225,7 @@ public class UriComponentsBuilder implements Cloneable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new {@code UriComponents} object from the string HTTP URL.
|
||||
* Create a URI components builder from the given HTTP URL String.
|
||||
* <p><strong>Note:</strong> The presence of reserved characters can prevent
|
||||
* correct parsing of the URI string. For example if a query parameter
|
||||
* contains {@code '='} or {@code '&'} characters, the query string cannot
|
||||
@@ -286,7 +286,7 @@ public class UriComponentsBuilder implements Cloneable {
|
||||
String hostToUse = hosts[0];
|
||||
if (hostToUse.contains(":")) {
|
||||
String[] hostAndPort = StringUtils.split(hostToUse, ":");
|
||||
host = hostAndPort[0];
|
||||
host = hostAndPort[0];
|
||||
port = Integer.parseInt(hostAndPort[1]);
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user