Polishing (in particular updating javadoc references to Apache Commons)
This commit is contained in:
parent
13659d645b
commit
bc6a98c144
|
@ -84,7 +84,7 @@ public class CommonsPool2TargetSource extends AbstractPoolingTargetSource implem
|
|||
private boolean useObjectEquality;
|
||||
|
||||
/**
|
||||
* The Jakarta Commons {@code ObjectPool} used to pool target objects
|
||||
* The Apache Commons {@code ObjectPool} used to pool target objects
|
||||
*/
|
||||
private ObjectPool pool;
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ public class CommonsPoolTargetSource extends AbstractPoolingTargetSource impleme
|
|||
private byte whenExhaustedAction = GenericObjectPool.DEFAULT_WHEN_EXHAUSTED_ACTION;
|
||||
|
||||
/**
|
||||
* The Jakarta Commons {@code ObjectPool} used to pool target objects
|
||||
* The Apache Commons {@code ObjectPool} used to pool target objects
|
||||
*/
|
||||
private ObjectPool pool;
|
||||
|
||||
|
|
|
@ -804,7 +804,7 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
|
|||
|
||||
oldBeanDefinition = this.beanDefinitionMap.get(beanName);
|
||||
if (oldBeanDefinition != null) {
|
||||
if (!this.allowBeanDefinitionOverriding) {
|
||||
if (!isAllowBeanDefinitionOverriding()) {
|
||||
throw new BeanDefinitionStoreException(beanDefinition.getResourceDescription(), beanName,
|
||||
"Cannot register bean definition [" + beanDefinition + "] for bean '" + beanName +
|
||||
"': There is already [" + oldBeanDefinition + "] bound.");
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2013 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. You may obtain a copy of
|
||||
|
@ -41,7 +41,7 @@ import java.util.Map;
|
|||
* Assert.notNull(clazz, "The class must not be null");
|
||||
* Assert.isTrue(i > 0, "The value must be greater than zero");</pre>
|
||||
*
|
||||
* Mainly for internal use within the framework; consider Jakarta's Commons Lang
|
||||
* Mainly for internal use within the framework; consider Apache's Commons Lang
|
||||
* >= 2.0 for a more comprehensive suite of assertion utilities.
|
||||
*
|
||||
* @author Keith Donald
|
||||
|
|
|
@ -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 java.util.Set;
|
|||
|
||||
/**
|
||||
* Miscellaneous utility methods for number conversion and parsing.
|
||||
* Mainly for internal use within the framework; consider Jakarta's
|
||||
* Mainly for internal use within the framework; consider Apache's
|
||||
* Commons Lang for a more comprehensive suite of string utilities.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
|
|
|
@ -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.
|
||||
|
@ -35,7 +35,7 @@ import java.util.TreeSet;
|
|||
* Miscellaneous {@link String} utility methods.
|
||||
*
|
||||
* <p>Mainly for internal use within the framework; consider
|
||||
* <a href="http://jakarta.apache.org/commons/lang/">Jakarta's Commons Lang</a>
|
||||
* <a href="http://jakarta.apache.org/commons/lang/">Apache's Commons Lang</a>
|
||||
* for a more comprehensive suite of String utilities.
|
||||
*
|
||||
* <p>This class delivers some simple functionality that should really
|
||||
|
|
|
@ -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.
|
||||
|
@ -83,7 +83,7 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
|
|||
* <p>This transaction manager can be used as a replacement for the
|
||||
* {@link org.springframework.transaction.jta.JtaTransactionManager} in the single
|
||||
* resource case, as it does not require a container that supports JTA, typically
|
||||
* in combination with a locally defined JDBC DataSource (e.g. a Jakarta Commons
|
||||
* in combination with a locally defined JDBC DataSource (e.g. an Apache Commons
|
||||
* DBCP connection pool). Switching between this local strategy and a JTA
|
||||
* environment is just a matter of configuration!
|
||||
*
|
||||
|
@ -126,8 +126,8 @@ public class DataSourceTransactionManager extends AbstractPlatformTransactionMan
|
|||
|
||||
/**
|
||||
* Set the JDBC DataSource that this instance should manage transactions for.
|
||||
* <p>This will typically be a locally defined DataSource, for example a
|
||||
* Jakarta Commons DBCP connection pool. Alternatively, you can also drive
|
||||
* <p>This will typically be a locally defined DataSource, for example an
|
||||
* Apache Commons DBCP connection pool. Alternatively, you can also drive
|
||||
* transactions for a non-XA J2EE DataSource fetched from JNDI. For an XA
|
||||
* DataSource, use JtaTransactionManager.
|
||||
* <p>The DataSource specified here should be the target DataSource to manage
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2013 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.
|
||||
|
@ -53,7 +53,7 @@ import org.springframework.util.ClassUtils;
|
|||
* bean definition to a local DataSource (which is simpler and thus recommended).
|
||||
*
|
||||
* <p>If you need a "real" connection pool outside of a J2EE container, consider
|
||||
* <a href="http://jakarta.apache.org/commons/dbcp">Apache's Jakarta Commons DBCP</a>
|
||||
* <a href="http://commons.apache.org/proper/commons-dbcp">Apache Commons DBCP</a>
|
||||
* or <a href="http://sourceforge.net/projects/c3p0">C3P0</a>.
|
||||
* Commons DBCP's BasicDataSource and C3P0's ComboPooledDataSource are full
|
||||
* connection pool beans, supporting the same basic properties as this class
|
||||
|
|
|
@ -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,8 @@ import org.springframework.util.Assert;
|
|||
|
||||
/**
|
||||
* Simple implementation of the standard JDBC {@link javax.sql.DataSource} interface,
|
||||
* configuring a plain old JDBC {@link java.sql.Driver} via bean properties, and returning
|
||||
* a new {@link java.sql.Connection} from every {@code getConnection} call.
|
||||
* configuring a plain old JDBC {@link java.sql.Driver} via bean properties, and
|
||||
* returning a new {@link java.sql.Connection} from every {@code getConnection} call.
|
||||
*
|
||||
* <p><b>NOTE: This class is not an actual connection pool; it does not actually
|
||||
* pool Connections.</b> It just serves as simple replacement for a full-blown
|
||||
|
@ -40,7 +40,7 @@ import org.springframework.util.Assert;
|
|||
* for seamless switching to and from a local DataSource bean like this class.
|
||||
*
|
||||
* <p>If you need a "real" connection pool outside of a J2EE container, consider
|
||||
* <a href="http://jakarta.apache.org/commons/dbcp">Apache's Jakarta Commons DBCP</a>
|
||||
* <a href="http://commons.apache.org/proper/commons-dbcp">Apache Commons DBCP</a>
|
||||
* or <a href="http://sourceforge.net/projects/c3p0">C3P0</a>.
|
||||
* Commons DBCP's BasicDataSource and C3P0's ComboPooledDataSource are full
|
||||
* connection pool beans, supporting the same basic properties as this class
|
||||
|
|
|
@ -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.
|
||||
|
@ -29,7 +29,7 @@ import org.springframework.util.ReflectionUtils;
|
|||
|
||||
/**
|
||||
* Implementation of the {@link NativeJdbcExtractor} interface for the
|
||||
* Jakarta Commons DBCP connection pool, version 1.1 or higher.
|
||||
* Apache Commons DBCP connection pool, version 1.1 or higher.
|
||||
*
|
||||
* <p>Returns the underlying native Connection, Statement, etc to application
|
||||
* code instead of DBCP's wrapper implementations. The returned JDBC classes
|
||||
|
|
|
@ -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.
|
||||
|
@ -42,7 +42,7 @@ import java.sql.Statement;
|
|||
*
|
||||
* <p>When working with a simple connection pool that wraps Connections but not
|
||||
* Statements, a {@link SimpleNativeJdbcExtractor} is often sufficient. However,
|
||||
* some pools (like Jakarta's Commons DBCP) wrap <i>all</i> JDBC objects that they
|
||||
* some pools (like Apache's Commons DBCP) wrap <i>all</i> JDBC objects that they
|
||||
* return: Therefore, you need to use a specific {@code NativeJdbcExtractor}
|
||||
* (like {@link CommonsDbcpNativeJdbcExtractor}) with them.
|
||||
*
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2013 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.
|
||||
|
@ -17,7 +17,7 @@
|
|||
package org.springframework.jdbc.support.nativejdbc;
|
||||
|
||||
/**
|
||||
* Simple implementation of the {@link NativeJdbcExtractor} interface.
|
||||
* A simple implementation of the {@link NativeJdbcExtractor} interface.
|
||||
* Assumes a pool that wraps Connection handles but not DatabaseMetaData:
|
||||
* In this case, the underlying native Connection can be retrieved by simply
|
||||
* calling {@code conHandle.getMetaData().getConnection()}.
|
||||
|
@ -35,10 +35,9 @@ package org.springframework.jdbc.support.nativejdbc;
|
|||
* flags to "true". If none of the statement types is wrapped - or you solely need
|
||||
* Connection unwrapping in the first place -, the defaults are fine.
|
||||
*
|
||||
* <p>SimpleNativeJdbcExtractor is a common choice for use with OracleLobHandler,
|
||||
* which just needs Connection unwrapping via the
|
||||
* {@link #getNativeConnectionFromStatement} method. This usage will work
|
||||
* with almost any connection pool.
|
||||
* <p>SimpleNativeJdbcExtractor is a common choice for use with OracleLobHandler, which
|
||||
* just needs Connection unwrapping via the {@link #getNativeConnectionFromStatement}
|
||||
* method. This usage will work with almost any connection pool.
|
||||
*
|
||||
* <p>For full usage with JdbcTemplate, i.e. to also provide Statement unwrapping:
|
||||
* <ul>
|
||||
|
@ -47,8 +46,8 @@ package org.springframework.jdbc.support.nativejdbc;
|
|||
* <li>Use a SimpleNativeJdbcExtractor with all "nativeConnectionNecessaryForXxx"
|
||||
* flags set to "true" for C3P0 (all JDBC Statement objects are wrapped,
|
||||
* but none of the wrappers allow for unwrapping).
|
||||
* <li>Use a CommonsDbcpNativeJdbcExtractor for Jakarta Commons DBCP respectively
|
||||
* a JBossNativeJdbcExtractor for JBoss (all JDBC Statement objects are wrapped,
|
||||
* <li>Use a CommonsDbcpNativeJdbcExtractor for Apache Commons DBCP or a
|
||||
* JBossNativeJdbcExtractor for JBoss (all JDBC Statement objects are wrapped,
|
||||
* but all of them can be extracted by casting to implementation classes).
|
||||
* </ul>
|
||||
*
|
||||
|
|
|
@ -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.
|
||||
|
@ -41,7 +41,7 @@ import org.springframework.util.ClassUtils;
|
|||
* <ul>
|
||||
* <li>{@code SingleConnectionDataSource} (using the same Connection for all getConnection calls)
|
||||
* <li>{@code DriverManagerDataSource} (creating a new Connection on each getConnection call)
|
||||
* <li>Apache's Jakarta Commons DBCP offers {@code org.apache.commons.dbcp.BasicDataSource} (a real pool)
|
||||
* <li>Apache's Commons DBCP offers {@code org.apache.commons.dbcp.BasicDataSource} (a real pool)
|
||||
* </ul>
|
||||
*
|
||||
* <p>Typical usage in bootstrap code:
|
||||
|
|
|
@ -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.
|
||||
|
@ -22,14 +22,13 @@ import javax.servlet.jsp.PageContext;
|
|||
import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager;
|
||||
|
||||
/**
|
||||
* Mock implementation of the JSP 2.0
|
||||
* {@link javax.servlet.jsp.el.ExpressionEvaluator} interface, delegating to the
|
||||
* Jakarta JSTL ExpressionEvaluatorManager.
|
||||
* <p>
|
||||
* Used for testing the web framework; only necessary for testing applications
|
||||
* Mock implementation of the JSP 2.0 {@link javax.servlet.jsp.el.ExpressionEvaluator}
|
||||
* interface, delegating to the Apache JSTL ExpressionEvaluatorManager.
|
||||
*
|
||||
* <p>Used for testing the web framework; only necessary for testing applications
|
||||
* when testing custom JSP tags.
|
||||
* <p>
|
||||
* Note that the Jakarta JSTL implementation (jstl.jar, standard.jar) has to be
|
||||
*
|
||||
* <p>Note that the Apache JSTL implementation (jstl.jar, standard.jar) has to be
|
||||
* available on the class path to use this expression evaluator.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
|
@ -44,20 +43,19 @@ public class MockExpressionEvaluator extends javax.servlet.jsp.el.ExpressionEval
|
|||
|
||||
/**
|
||||
* Create a new MockExpressionEvaluator for the given PageContext.
|
||||
*
|
||||
* @param pageContext the JSP PageContext to run in
|
||||
*/
|
||||
public MockExpressionEvaluator(PageContext pageContext) {
|
||||
this.pageContext = pageContext;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("rawtypes")
|
||||
public javax.servlet.jsp.el.Expression parseExpression(final String expression, final Class expectedType,
|
||||
final javax.servlet.jsp.el.FunctionMapper functionMapper) throws javax.servlet.jsp.el.ELException {
|
||||
|
||||
return new javax.servlet.jsp.el.Expression() {
|
||||
|
||||
@Override
|
||||
public Object evaluate(javax.servlet.jsp.el.VariableResolver variableResolver) throws javax.servlet.jsp.el.ELException {
|
||||
return doEvaluate(expression, expectedType, functionMapper);
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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.
|
||||
|
@ -36,7 +36,7 @@ import org.springframework.web.portlet.util.PortletUtils;
|
|||
|
||||
/**
|
||||
* {@link PortletMultipartResolver} 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>
|
||||
* 1.2 or above.
|
||||
*
|
||||
* <p>Provides "maxUploadSize", "maxInMemorySize" and "defaultEncoding" settings as
|
||||
|
|
|
@ -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.
|
||||
|
@ -30,25 +30,23 @@ import org.springframework.web.multipart.MultipartException;
|
|||
* <p>There is one concrete implementation included in Spring:
|
||||
* <ul>
|
||||
* <li>{@link org.springframework.web.multipart.commons.CommonsMultipartResolver}
|
||||
* for Jakarta Commons FileUpload
|
||||
* for Apache Commons FileUpload
|
||||
* </ul>
|
||||
*
|
||||
* <p>There is no default resolver implementation used for Spring
|
||||
* {@link org.springframework.web.portlet.DispatcherPortlet DispatcherPortlets},
|
||||
* as an application might choose to parse its multipart requests itself. To
|
||||
* define an implementation, create a bean with the id
|
||||
* {@link org.springframework.web.portlet.DispatcherPortlet#MULTIPART_RESOLVER_BEAN_NAME "portletMultipartResolver"}
|
||||
* define an implementation, create a bean with the id "portletMultipartResolver"
|
||||
* in a {@code DispatcherPortlet's} application context. Such a resolver
|
||||
* gets applied to all requests handled by that {@code DispatcherPortlet}.
|
||||
*
|
||||
* <p>If a {@code DispatcherPortlet} detects a multipart request, it will
|
||||
* resolve it via the configured
|
||||
* {@link org.springframework.web.multipart.MultipartResolver} and pass on a
|
||||
* wrapped Portlet {@link ActionRequest}.
|
||||
* {@link org.springframework.web.portlet.mvc.Controller Controllers} can then
|
||||
* {@link org.springframework.web.portlet.multipart.PortletMultipartResolver}
|
||||
* and pass on a wrapped Portlet {@link ActionRequest}. Controllers can then
|
||||
* cast their given request to the {@link MultipartActionRequest} interface,
|
||||
* being able to access {@code MultipartFiles}. Note that this cast is
|
||||
* only supported in case of an actual multipart request.
|
||||
* being able to access {@code MultipartFiles}. Note that this cast is only
|
||||
* supported in case of an actual multipart request.
|
||||
*
|
||||
* <pre class="code"> public void handleActionRequest(ActionRequest request, ActionResponse response) {
|
||||
* MultipartActionRequest multipartRequest = (MultipartActionRequest) request;
|
||||
|
@ -59,13 +57,12 @@ import org.springframework.web.multipart.MultipartException;
|
|||
* 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>Note: There is hardly ever a need to access the
|
||||
* {@code MultipartResolver} itself from application code. It will simply
|
||||
* do its work behind the scenes, making {@code MultipartActionRequests}
|
||||
* available to controllers.
|
||||
* <p>Note: There is hardly ever a need to access the {@code MultipartResolver}
|
||||
* itself from application code. It will simply do its work behind the scenes,
|
||||
* making {@code MultipartActionRequests} available to controllers.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 2.0
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2013 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.
|
||||
|
@ -51,7 +51,7 @@ import org.springframework.web.servlet.view.AbstractView;
|
|||
* </ul>
|
||||
*
|
||||
* <p>For working with the workbook in the subclass, see
|
||||
* <a href="http://jakarta.apache.org/poi/index.html">Jakarta's POI site</a>
|
||||
* <a href="http://poi.apache.org">Apache's POI site</a>
|
||||
*
|
||||
* <p>As an example, you can try this snippet:
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue