Eliminate all Javadoc warnings
- Support external Javadoc links using Gradle's javadoc.options.links - Fix all other Javadoc warnings, such as typos, references to non-existent (or no longer existent) types and members, etc, including changes related to the Quartz 2.0 upgrade (SPR-8275) and adding the HTTP PATCH method (SPR-7985). - Suppress all output for project-level `javadoc` tasks in order to hide false-negative warnings about cross-module @see and @link references (e.g. spring-core having a @see reference to spring-web). Use the `--info` (-i) flag to gradle at any time to see project-level javadoc warnings without running the entire `api` task. e.g. `gradle :spring-core:javadoc -i` - Favor root project level `api` task for detection of legitimate Javadoc warnings. There are now zero Javadoc warnings across the entirety of spring-framework. Goal: keep it that way. - Remove all @link and @see references to types and members that exist only in Servlet <= 2.5 and Hibernate <= 4.0, favoring 3.0+ and 4.0+ respectively. This is necessary because only one version of each of these dependencies can be present on the global `api` javadoc task's classpath. To that end, the `api` task classpath has now been customized to ensure that the Servlet 3 API and Hibernate Core 4 jars have precedence. - SPR-8896 replaced our dependency on aspectjrt with a dependency on aspectjweaver, which is fine from a POM point of view, but causes a spurious warning to be emitted from the ant iajc task that it "cannot find aspectjrt on the classpath" - even though aspectjweaver is perfectly sufficient. In the name of keeping the console quiet, a new `rt` configuration has been added, and aspectjrt added as a dependency to it. In turn, configurations.rt.asPath is appended to the iajc classpath during both compileJava and compileTestJava for spring-aspects. Issue: SPR-10078, SPR-8275, SPR-7985, SPR-8896
This commit is contained in:
56
build.gradle
56
build.gradle
@@ -43,6 +43,28 @@ configure(allprojects) {
|
||||
testCompile("org.hamcrest:hamcrest-all:1.3")
|
||||
testCompile("org.easymock:easymock:${easymockVersion}")
|
||||
}
|
||||
|
||||
ext.javadocLinks = [
|
||||
"http://docs.oracle.com/javase/6/docs/api",
|
||||
"http://docs.oracle.com/javaee/6/api",
|
||||
"http://portals.apache.org/pluto/portlet-2.0-apidocs/",
|
||||
"http://commons.apache.org/lang/api-2.5",
|
||||
"http://commons.apache.org/codec/apidocs",
|
||||
"http://docs.jboss.org/jbossas/javadoc/4.0.5/connector",
|
||||
"http://docs.jboss.org/jbossas/javadoc/7.1.2.Final",
|
||||
"http://aopalliance.sourceforge.net/doc",
|
||||
"http://glassfish.java.net/nonav/docs/v3/api",
|
||||
"http://docs.oracle.com/cd/E13222_01/wls/docs90/javadocs", // commonj
|
||||
"http://quartz-scheduler.org/api/2.1.5",
|
||||
"http://www.eclipse.org/aspectj/doc/released/aspectj5rt-api/",
|
||||
"http://hc.apache.org/httpclient-3.x/apidocs",
|
||||
"http://fasterxml.github.com/jackson-core/javadoc/2.0.0",
|
||||
"http://jackson.codehaus.org/1.4.2/javadoc",
|
||||
"http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/topic/com.ibm.websphere.javadoc.doc/web/apidocs",
|
||||
"http://ibatis.apache.org/docs/java/dev",
|
||||
"http://tiles.apache.org/framework/apidocs",
|
||||
"http://commons.apache.org/dbcp/api-1.2.2",
|
||||
] as String[]
|
||||
}
|
||||
|
||||
configure(subprojects) { subproject ->
|
||||
@@ -64,10 +86,17 @@ configure(subprojects) { subproject ->
|
||||
}
|
||||
|
||||
javadoc {
|
||||
description = "Generates project-level javadoc for use in -javadoc jar"
|
||||
|
||||
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
|
||||
options.author = true
|
||||
options.header = project.name
|
||||
//options.overview = "${projectDir}/src/main/java/overview.html"
|
||||
options.links(project.ext.javadocLinks)
|
||||
|
||||
// suppress warnings due to cross-module @see and @link references;
|
||||
// note that global 'api' task does display all warnings.
|
||||
logging.captureStandardError LogLevel.INFO
|
||||
logging.captureStandardOutput LogLevel.INFO // suppress "## warnings" message
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn:classes) {
|
||||
@@ -641,6 +670,7 @@ project("spring-aspects") {
|
||||
provided("javax.persistence:persistence-api:1.0")
|
||||
testCompile("javax.mail:mail:1.4")
|
||||
ajc("org.aspectj:aspectjtools:${aspectjVersion}")
|
||||
rt("org.aspectj:aspectjrt:${aspectjVersion}")
|
||||
compile("org.aspectj:aspectjweaver:${aspectjVersion}")
|
||||
testCompile(project(":spring-core")) // for CodeStyleAspect
|
||||
compile(project(":spring-beans")) // for "p" namespace visibility
|
||||
@@ -677,8 +707,6 @@ configure(rootProject) {
|
||||
configurations.archives.artifacts.clear()
|
||||
|
||||
dependencies { // for integration tests
|
||||
compile gradleApi()
|
||||
groovy localGroovy()
|
||||
testCompile(project(":spring-core"))
|
||||
testCompile(project(":spring-beans"))
|
||||
testCompile(project(":spring-aop"))
|
||||
@@ -703,22 +731,30 @@ configure(rootProject) {
|
||||
group = "Documentation"
|
||||
description = "Generates aggregated Javadoc API documentation."
|
||||
title = "${rootProject.description} ${version} API"
|
||||
|
||||
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
|
||||
options.author = true
|
||||
options.header = rootProject.description
|
||||
options.overview = "src/api/overview.html"
|
||||
options.splitIndex = true
|
||||
options.links(
|
||||
"http://docs.jboss.org/jbossas/javadoc/4.0.5/connector"
|
||||
)
|
||||
options.links(project.ext.javadocLinks)
|
||||
|
||||
source subprojects.collect { project ->
|
||||
project.sourceSets.main.allJava
|
||||
}
|
||||
destinationDir = new File(buildDir, "api")
|
||||
classpath = files(subprojects.collect { project ->
|
||||
project.sourceSets.main.compileClasspath
|
||||
})
|
||||
|
||||
classpath = files(
|
||||
// ensure servlet 3.x and Hibernate 4.x have precedence on the Javadoc
|
||||
// classpath over their respective 2.5 and 3.x variants
|
||||
project(":spring-webmvc").sourceSets.main.compileClasspath.files.find { it =~ "servlet-api" },
|
||||
rootProject.sourceSets.test.compileClasspath.files.find { it =~ "hibernate-core" },
|
||||
// ensure the javadoc process can resolve types compiled from .aj sources
|
||||
project(":spring-aspects").sourceSets.main.output
|
||||
)
|
||||
classpath += files(subprojects.collect { it.sourceSets.main.compileClasspath })
|
||||
|
||||
maxMemory = "1024m"
|
||||
destinationDir = new File(buildDir, "api")
|
||||
}
|
||||
|
||||
task docsZip(type: Zip) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2009 the original author or authors.
|
||||
* Copyright 2002-2012 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.
|
||||
@@ -114,7 +114,7 @@ public class AspectJProxyFactory extends ProxyCreatorSupport {
|
||||
/**
|
||||
* Add all {@link Advisor Advisors} from the supplied {@link MetadataAwareAspectInstanceFactory}
|
||||
* to the current chain. Exposes any special purpose {@link Advisor Advisors} if needed.
|
||||
* @see #makeAdvisorChainAspectJCapableIfNecessary()
|
||||
* @see AspectJProxyUtils#makeAdvisorChainAspectJCapableIfNecessary(List)
|
||||
*/
|
||||
private void addAdvisorsFromAspectInstanceFactory(MetadataAwareAspectInstanceFactory instanceFactory) {
|
||||
List<Advisor> advisors = this.aspectFactory.getAdvisors(instanceFactory);
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.springframework.util.StringUtils;
|
||||
/**
|
||||
* Base class for asynchronous method execution aspects, such as
|
||||
* {@link org.springframework.scheduling.annotation.AnnotationAsyncExecutionInterceptor}
|
||||
* or {@link org.springframework.scheduling.aspectj.AnnotationAsyncExecutionAspect}.
|
||||
* or {@code org.springframework.scheduling.aspectj.AnnotationAsyncExecutionAspect}.
|
||||
*
|
||||
* <p>Provides support for <i>executor qualification</i> on a method-by-method basis.
|
||||
* {@code AsyncExecutionAspectSupport} objects must be constructed with a default {@code
|
||||
@@ -87,7 +87,7 @@ public abstract class AsyncExecutionAspectSupport implements BeanFactoryAware {
|
||||
|
||||
/**
|
||||
* Determine the specific executor to use when executing the given method.
|
||||
* @returns the executor to use (never {@code null})
|
||||
* @return the executor to use (never {@code null})
|
||||
*/
|
||||
protected AsyncTaskExecutor determineAsyncExecutor(Method method) {
|
||||
if (!this.executors.containsKey(method)) {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// compile sources with ajc instead of javac
|
||||
|
||||
configurations {
|
||||
rt
|
||||
ajc
|
||||
aspects
|
||||
ajInpath
|
||||
@@ -26,7 +27,7 @@ task compileJava(overwrite: true) {
|
||||
aspectPath: configurations.aspects.asPath,
|
||||
inpath: configurations.ajInpath.asPath,
|
||||
sourceRootCopyFilter: "**/*.java",
|
||||
classpath: sourceSets.main.runtimeClasspath.asPath) {
|
||||
classpath: (sourceSets.main.runtimeClasspath + configurations.rt).asPath) {
|
||||
sourceroots {
|
||||
sourceSets.main.java.srcDirs.each {
|
||||
pathelement(location:it.absolutePath)
|
||||
@@ -55,7 +56,8 @@ task compileTestJava(overwrite: true) {
|
||||
destDir: outputDir.absolutePath,
|
||||
aspectPath: jar.archivePath,
|
||||
inpath: configurations.ajInpath.asPath,
|
||||
classpath: sourceSets.test.runtimeClasspath.asPath + jar.archivePath) {
|
||||
classpath: sourceSets.test.runtimeClasspath.asPath + jar.archivePath +
|
||||
System.getProperty("path.separator") + configurations.rt.asPath) {
|
||||
sourceroots {
|
||||
sourceSets.test.java.srcDirs.each {
|
||||
pathelement(location:it.absolutePath)
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Role;
|
||||
|
||||
/**
|
||||
* {@code @Configuration} class that registers an {@link AnnotationBeanConfigurerAspect}
|
||||
* {@code @Configuration} class that registers an {@code AnnotationBeanConfigurerAspect}
|
||||
* capable of performing dependency injection services for non-Spring managed objects
|
||||
* annotated with @{@link org.springframework.beans.factory.annotation.Configurable
|
||||
* Configurable}.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
* Copyright 2002-2012 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,10 +22,10 @@ import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Annotation to indicate a test class for whose @Test methods
|
||||
* static methods on Entity classes should be mocked.
|
||||
* static methods on Entity classes should be mocked. See
|
||||
* {@code AbstractMethodMockingControl}.
|
||||
*
|
||||
* @author Rod Johnson
|
||||
* @see AbstractMethodMockingControl
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
|
||||
@@ -37,8 +37,8 @@ import org.springframework.util.StringValueResolver;
|
||||
*
|
||||
* <p>{@link PropertyPlaceholderConfigurer} is still appropriate for use when:
|
||||
* <ul>
|
||||
* <li>the {@link org.springframework.context spring-context} module is not available (i.e., one is using
|
||||
* Spring's {@code BeanFactory} API as opposed to {@code ApplicationContext}).
|
||||
* <li>the {@code spring-context} module is not available (i.e., one is using Spring's
|
||||
* {@code BeanFactory} API as opposed to {@code ApplicationContext}).
|
||||
* <li>existing configuration makes use of the {@link #setSystemPropertiesMode(int) "systemPropertiesMode"} and/or
|
||||
* {@link #setSystemPropertiesModeName(String) "systemPropertiesModeName"} properties. Users are encouraged to move
|
||||
* away from using these settings, and rather configure property source search order through the container's
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2011 the original author or authors.
|
||||
* Copyright 2002-2012 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.
|
||||
@@ -112,10 +112,10 @@ public abstract class SchedulerAccessor implements ResourceLoaderAware {
|
||||
|
||||
/**
|
||||
* Set the location of a Quartz job definition XML file that follows the
|
||||
* "job_scheduling_data_1_5" XSD. Can be specified to automatically
|
||||
* "job_scheduling_data_1_5" XSD or better. Can be specified to automatically
|
||||
* register jobs that are defined in such a file, possibly in addition
|
||||
* to jobs defined directly on this SchedulerFactoryBean.
|
||||
* @see org.quartz.xml.JobSchedulingDataProcessor
|
||||
* @see org.quartz.xml.XmlSchedulingDataProcessor
|
||||
*/
|
||||
public void setJobSchedulingDataLocation(String jobSchedulingDataLocation) {
|
||||
this.jobSchedulingDataLocations = new String[] {jobSchedulingDataLocation};
|
||||
@@ -123,10 +123,10 @@ public abstract class SchedulerAccessor implements ResourceLoaderAware {
|
||||
|
||||
/**
|
||||
* Set the locations of Quartz job definition XML files that follow the
|
||||
* "job_scheduling_data_1_5" XSD. Can be specified to automatically
|
||||
* "job_scheduling_data_1_5" XSD or better. Can be specified to automatically
|
||||
* register jobs that are defined in such files, possibly in addition
|
||||
* to jobs defined directly on this SchedulerFactoryBean.
|
||||
* @see org.quartz.xml.JobSchedulingDataProcessor
|
||||
* @see org.quartz.xml.XmlSchedulingDataProcessor
|
||||
*/
|
||||
public void setJobSchedulingDataLocations(String[] jobSchedulingDataLocations) {
|
||||
this.jobSchedulingDataLocations = jobSchedulingDataLocations;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2011 the original author or authors.
|
||||
* Copyright 2002-2012 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.
|
||||
@@ -58,8 +58,8 @@ public @interface CacheEvict {
|
||||
/**
|
||||
* Whether or not all the entries inside the cache(s) are removed or not. By
|
||||
* default, only the value under the associated key is removed.
|
||||
* <p>Note that specifying setting this parameter to true and specifying a
|
||||
* {@link CacheKey key} is not allowed.
|
||||
* <p>Note that setting this parameter to {@code true} and specifying a {@link #key()}
|
||||
* is not allowed.
|
||||
*/
|
||||
boolean allEntries() default false;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Factory that creates a Joda {@link DateTimeFormatter}. Formatters will be
|
||||
* created using the defined {@link #setPattern(String) pattern}, {@link #setIso(ISO) ISO},
|
||||
* created using the defined {@link #setPattern(String) pattern}, {@link #setIso ISO},
|
||||
* or {@link #setStyle(String) style} (considered in that order).
|
||||
*
|
||||
* @author Phillip Webb
|
||||
@@ -36,7 +36,7 @@ import org.springframework.util.StringUtils;
|
||||
* @see #createDateTimeFormatter()
|
||||
* @see #createDateTimeFormatter(DateTimeFormatter)
|
||||
* @see #setPattern(String)
|
||||
* @see #setIso(org.springframework.format.annotation.DateTimeFormat.ISO)
|
||||
* @see #setIso
|
||||
* @see #setStyle(String)
|
||||
* @see DateTimeFormatterFactoryBean
|
||||
*/
|
||||
@@ -68,7 +68,7 @@ public class DateTimeFormatterFactory {
|
||||
|
||||
/**
|
||||
* Create a new {@code DateTimeFormatter} using this factory. If no specific
|
||||
* {@link #setStyle(String) style}, {@link #setIso(ISO) ISO}, or
|
||||
* {@link #setStyle(String) style}, {@link #setIso ISO}, or
|
||||
* {@link #setPattern(String) pattern} have been defined the
|
||||
* {@link DateTimeFormat#mediumDateTime() medium date time format} will be used.
|
||||
* @return a new date time formatter
|
||||
@@ -80,7 +80,7 @@ public class DateTimeFormatterFactory {
|
||||
|
||||
/**
|
||||
* Create a new {@code DateTimeFormatter} using this factory. If no specific
|
||||
* {@link #setStyle(String) style}, {@link #setIso(ISO) ISO}, or
|
||||
* {@link #setStyle(String) style}, {@link #setIso ISO}, or
|
||||
* {@link #setPattern(String) pattern} have been defined the supplied
|
||||
* {@code fallbackFormatter} will be used.
|
||||
* @param fallbackFormatter the fall-back formatter to use when no specific factory
|
||||
|
||||
@@ -34,11 +34,12 @@ import org.springframework.jmx.MBeanServerNotFoundException;
|
||||
* This FactoryBean is a direct alternative to {@link MBeanServerFactoryBean},
|
||||
* which uses standard JMX 1.2 API to access the platform's MBeanServer.
|
||||
*
|
||||
* <p>See Javadoc for WebSphere's <a href="http://bit.ly/UzccDt">{@code
|
||||
* AdminServiceFactory}</a> and <a href="http://bit.ly/TRlX2r">{@code MBeanFactory}</a>.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @author Rob Harrop
|
||||
* @since 2.0.3
|
||||
* @see com.ibm.websphere.management.AdminServiceFactory#getMBeanFactory()
|
||||
* @see com.ibm.websphere.management.MBeanFactory#getMBeanServer()
|
||||
* @see javax.management.MBeanServer
|
||||
* @see MBeanServerFactoryBean
|
||||
*/
|
||||
|
||||
@@ -276,7 +276,7 @@ public class ScheduledTaskRegistrar implements InitializingBean, DisposableBean
|
||||
|
||||
/**
|
||||
* Schedule all registered tasks against the underlying {@linkplain
|
||||
* #setTaskScheduler(TaskScheduler) task scheduler.
|
||||
* #setTaskScheduler(TaskScheduler) task scheduler}.
|
||||
*/
|
||||
public void afterPropertiesSet() {
|
||||
long now = System.currentTimeMillis();
|
||||
|
||||
@@ -294,7 +294,7 @@ public abstract class CollectionFactory {
|
||||
/**
|
||||
* Create the most approximate map for the given map.
|
||||
* <p>Creates a TreeMap or linked Map for a SortedMap or Map, respectively.
|
||||
* @param collectionType the desired type of the target Map
|
||||
* @param mapType the desired type of the target Map
|
||||
* @param initialCapacity the initial capacity
|
||||
* @return the new Map instance
|
||||
* @see java.util.TreeMap
|
||||
|
||||
@@ -18,7 +18,6 @@ package org.springframework.core.convert.converter;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.springframework.core.convert.ConversionService;
|
||||
import org.springframework.util.Assert;
|
||||
@@ -44,7 +43,6 @@ public class ConvertingComparator<S, T> implements Comparator<S> {
|
||||
/**
|
||||
* Create a new {@link ConvertingComparator} instance.
|
||||
*
|
||||
* @param comparator the underlying comparator used to compare the converted values
|
||||
* @param converter the converter
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -86,8 +84,8 @@ public class ConvertingComparator<S, T> implements Comparator<S> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new {@link ConvertingComparator} that compares {@link Map.Entry map
|
||||
* entries} based on their {@link Map.Entry#getKey() keys}.
|
||||
* Create a new {@link ConvertingComparator} that compares {@link java.util.Map.Entry
|
||||
* map * entries} based on their {@link java.util.Map.Entry#getKey() keys}.
|
||||
*
|
||||
* @param comparator the underlying comparator used to compare keys
|
||||
* @return a new {@link ConvertingComparator} instance
|
||||
@@ -96,15 +94,15 @@ public class ConvertingComparator<S, T> implements Comparator<S> {
|
||||
Comparator<K> comparator) {
|
||||
return new ConvertingComparator<Map.Entry<K,V>, K>(comparator, new Converter<Map.Entry<K, V>, K>() {
|
||||
|
||||
public K convert(Entry<K, V> source) {
|
||||
public K convert(Map.Entry<K, V> source) {
|
||||
return source.getKey();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new {@link ConvertingComparator} that compares {@link Map.Entry map
|
||||
* entries} based on their {@link Map.Entry#getValue() values}.
|
||||
* Create a new {@link ConvertingComparator} that compares {@link java.util.Map.Entry
|
||||
* map entries} based on their {@link java.util.Map.Entry#getValue() values}.
|
||||
*
|
||||
* @param comparator the underlying comparator used to compare values
|
||||
* @return a new {@link ConvertingComparator} instance
|
||||
@@ -113,7 +111,7 @@ public class ConvertingComparator<S, T> implements Comparator<S> {
|
||||
Comparator<V> comparator) {
|
||||
return new ConvertingComparator<Map.Entry<K,V>, V>(comparator, new Converter<Map.Entry<K, V>, V>() {
|
||||
|
||||
public V convert(Entry<K, V> source) {
|
||||
public V convert(Map.Entry<K, V> source) {
|
||||
return source.getValue();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -33,7 +33,6 @@ import org.springframework.util.Assert;
|
||||
* @author Juergen Hoeller
|
||||
* @author Costin Leau
|
||||
* @since 3.0
|
||||
* @see org.jboss.virtual.VirtualFile
|
||||
* @see org.jboss.vfs.VirtualFile
|
||||
*/
|
||||
public class VfsResource extends AbstractResource {
|
||||
|
||||
@@ -404,8 +404,8 @@ public class ConcurrentReferenceHashMap<K, V> extends AbstractMap<K, V> implemen
|
||||
|
||||
/**
|
||||
* Array of references indexed using the low order bits from the hash. This
|
||||
* property should only be set via {@link #setReferences(Reference[])} to ensure
|
||||
* that the resizeThreshold is maintained.
|
||||
* property should only be set via {@link #setReferences} to ensure that the
|
||||
* {@code resizeThreshold} is maintained.
|
||||
*/
|
||||
private volatile Reference<K, V>[] references;
|
||||
|
||||
|
||||
@@ -36,8 +36,8 @@ import org.springframework.util.ClassUtils;
|
||||
/**
|
||||
* Convenience methods for working with the StAX API.
|
||||
*
|
||||
* <p>In particular, methods for using StAX ({@link javax.xml.stream}) in combination with the TrAX API
|
||||
* ({@link javax.xml.transform}), and converting StAX readers/writers into SAX readers/handlers and vice-versa.
|
||||
* <p>In particular, methods for using StAX ({@code javax.xml.stream}) in combination with the TrAX API
|
||||
* ({@code javax.xml.transform}), and converting StAX readers/writers into SAX readers/handlers and vice-versa.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @author Juergen Hoeller
|
||||
|
||||
@@ -146,7 +146,6 @@ public abstract class TemplateAwareExpressionParser implements ExpressionParser
|
||||
* @param expressionString the expression string which may contain the suffix
|
||||
* @param pos the start position at which to check for the suffix
|
||||
* @param suffix the suffix string
|
||||
* @return
|
||||
*/
|
||||
private boolean isSuffixHere(String expressionString,int pos,String suffix) {
|
||||
int suffixPosition = 0;
|
||||
|
||||
@@ -22,8 +22,6 @@ import javax.sql.rowset.CachedRowSet;
|
||||
import javax.sql.rowset.RowSetFactory;
|
||||
import javax.sql.rowset.RowSetProvider;
|
||||
|
||||
import com.sun.rowset.CachedRowSetImpl;
|
||||
|
||||
import org.springframework.core.JdkVersion;
|
||||
import org.springframework.jdbc.support.rowset.ResultSetWrappingSqlRowSet;
|
||||
import org.springframework.jdbc.support.rowset.SqlRowSet;
|
||||
@@ -91,7 +89,6 @@ public class SqlRowSetResultSetExtractor implements ResultSetExtractor<SqlRowSet
|
||||
* @return a new CachedRowSet instance
|
||||
* @throws SQLException if thrown by JDBC methods
|
||||
* @see #createSqlRowSet
|
||||
* @see com.sun.rowset.CachedRowSetImpl
|
||||
*/
|
||||
protected CachedRowSet newCachedRowSet() throws SQLException {
|
||||
return cachedRowSetFactory.createCachedRowSet();
|
||||
@@ -135,7 +132,7 @@ public class SqlRowSetResultSetExtractor implements ResultSetExtractor<SqlRowSet
|
||||
private static class SunCachedRowSetFactory implements CachedRowSetFactory {
|
||||
|
||||
public CachedRowSet createCachedRowSet() throws SQLException {
|
||||
return new CachedRowSetImpl();
|
||||
return new com.sun.rowset.CachedRowSetImpl();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
* Copyright 2002-2012 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.
|
||||
@@ -58,7 +58,7 @@ import org.springframework.util.FileCopyUtils;
|
||||
* <code>oracle.jdbc.OracleConnection</code>. If you pass in Connections from a
|
||||
* connection pool (the usual case in a J2EE environment), you need to set an
|
||||
* appropriate {@link org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor}
|
||||
* to allow for automatical retrieval of the underlying native JDBC Connection.
|
||||
* to allow for automatic retrieval of the underlying native JDBC Connection.
|
||||
* LobHandler and NativeJdbcExtractor are separate concerns, therefore they
|
||||
* are represented by separate strategy interfaces.
|
||||
*
|
||||
@@ -73,8 +73,6 @@ import org.springframework.util.FileCopyUtils;
|
||||
* @author Thomas Risberg
|
||||
* @since 04.12.2003
|
||||
* @see #setNativeJdbcExtractor
|
||||
* @see oracle.sql.BLOB
|
||||
* @see oracle.sql.CLOB
|
||||
*/
|
||||
public class OracleLobHandler extends AbstractLobHandler {
|
||||
|
||||
@@ -117,13 +115,14 @@ public class OracleLobHandler extends AbstractLobHandler {
|
||||
* method, namely <code>getNativeConnectionFromStatement</code> with a
|
||||
* PreparedStatement argument (falling back to a
|
||||
* <code>PreparedStatement.getConnection()</code> call if no extractor is set).
|
||||
* <p>A common choice is SimpleNativeJdbcExtractor, whose Connection unwrapping
|
||||
* <p>A common choice is {@code SimpleNativeJdbcExtractor}, whose Connection unwrapping
|
||||
* (which is what OracleLobHandler needs) will work with many connection pools.
|
||||
* See SimpleNativeJdbcExtractor's javadoc for details.
|
||||
* See {@code SimpleNativeJdbcExtractor} and
|
||||
* <a href="http://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/jdbc/OracleConnection.html">
|
||||
* oracle.jdbc.OracleConnection</a> javadoc for details.
|
||||
* @see org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor#getNativeConnectionFromStatement
|
||||
* @see org.springframework.jdbc.support.nativejdbc.SimpleNativeJdbcExtractor
|
||||
* @see org.springframework.jdbc.support.nativejdbc.OracleJdbc4NativeJdbcExtractor
|
||||
* @see oracle.jdbc.OracleConnection
|
||||
*/
|
||||
public void setNativeJdbcExtractor(NativeJdbcExtractor nativeJdbcExtractor) {
|
||||
this.nativeJdbcExtractor = nativeJdbcExtractor;
|
||||
@@ -132,10 +131,12 @@ public class OracleLobHandler extends AbstractLobHandler {
|
||||
/**
|
||||
* Set whether to cache the temporary LOB in the buffer cache.
|
||||
* This value will be passed into BLOB/CLOB.createTemporary.
|
||||
*
|
||||
* <p>Default is <code>true</code>.
|
||||
* @see oracle.sql.BLOB#createTemporary
|
||||
* @see oracle.sql.CLOB#createTemporary
|
||||
* <p><strong>See Also:</strong>
|
||||
* <ul>
|
||||
* <li><a href="http://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/sql/BLOB.html#createTemporary()">oracle.sql.BLOB.createTemporary</a></li>
|
||||
* <li><a href="http://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/sql/CLOB.html#createTemporary()">oracle.sql.CLOB.createTemporary</a></li>
|
||||
* </ul>
|
||||
*/
|
||||
public void setCache(boolean cache) {
|
||||
this.cache = cache;
|
||||
@@ -149,12 +150,15 @@ public class OracleLobHandler extends AbstractLobHandler {
|
||||
* temporary LOBs that occupy space in the TEMPORARY tablespace or when you want to free up any
|
||||
* memory allocated by the driver for the LOB reading.
|
||||
* <p>Default is <code>false</code>.
|
||||
* @see oracle.sql.BLOB#freeTemporary
|
||||
* @see oracle.sql.CLOB#freeTemporary
|
||||
* @see oracle.sql.BLOB#open
|
||||
* @see oracle.sql.CLOB#open
|
||||
* @see oracle.sql.BLOB#close
|
||||
* @see oracle.sql.CLOB#close
|
||||
* <p><strong>See Also:</strong>
|
||||
* <ul>
|
||||
* <li><a href="http://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/sql/BLOB.html#freeTemporary()">oracle.sql.BLOB.freeTemporary</a></li>
|
||||
* <li><a href="http://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/sql/CLOB.html#freeTemporary()">oracle.sql.CLOB.freeTemporary</a></li>
|
||||
* <li><a href="http://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/sql/BLOB.html#open()">oracle.sql.BLOB.open</a></li>
|
||||
* <li><a href="http://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/sql/CLOB.html#open()">oracle.sql.CLOB.open</a></li>
|
||||
* <li><a href="http://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/sql/BLOB.html#open()">oracle.sql.BLOB.close</a></li>
|
||||
* <li><a href="http://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/sql/CLOB.html#open()">oracle.sql.CLOB.close</a></li>
|
||||
* </ul>
|
||||
*/
|
||||
public void setReleaseResourcesAfterRead(boolean releaseResources) {
|
||||
this.releaseResourcesAfterRead = releaseResources;
|
||||
@@ -165,14 +169,17 @@ public class OracleLobHandler extends AbstractLobHandler {
|
||||
* Retrieve the <code>oracle.sql.BLOB</code> and <code>oracle.sql.CLOB</code>
|
||||
* classes via reflection, and initialize the values for the
|
||||
* DURATION_SESSION, MODE_READWRITE and MODE_READONLY constants defined there.
|
||||
* <p><strong>See Also:</strong>
|
||||
* <ul>
|
||||
* <li><a href="http://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/sql/BLOB.html#DURATION_SESSION">oracle.sql.BLOB.DURATION_SESSION</a></li>
|
||||
* <li><a href="http://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/sql/BLOB.html#MODE_READWRITE">oracle.sql.BLOB.MODE_READWRITE</a></li>
|
||||
* <li><a href="http://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/sql/BLOB.html#MODE_READONLY">oracle.sql.BLOB.MODE_READONLY</a></li>
|
||||
* <li><a href="http://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/sql/CLOB.html#DURATION_SESSION">oracle.sql.CLOB.DURATION_SESSION</a></li>
|
||||
* <li><a href="http://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/sql/CLOB.html#MODE_READWRITE">oracle.sql.CLOB.MODE_READWRITE</a></li>
|
||||
* <li><a href="http://download.oracle.com/otn_hosted_doc/jdeveloper/905/jdbc-javadoc/oracle/sql/CLOB.html#MODE_READONLY">oracle.sql.CLOB.MODE_READONLY</a></li>
|
||||
* </ul>
|
||||
* @param con the Oracle Connection, for using the exact same class loader
|
||||
* that the Oracle driver was loaded with
|
||||
* @see oracle.sql.BLOB#DURATION_SESSION
|
||||
* @see oracle.sql.BLOB#MODE_READWRITE
|
||||
* @see oracle.sql.BLOB#MODE_READONLY
|
||||
* @see oracle.sql.CLOB#DURATION_SESSION
|
||||
* @see oracle.sql.CLOB#MODE_READWRITE
|
||||
* @see oracle.sql.CLOB#MODE_READONLY
|
||||
*/
|
||||
protected synchronized void initOracleDriverClasses(Connection con) {
|
||||
if (this.blobClass == null) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2008 the original author or authors.
|
||||
* Copyright 2002-2012 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,6 @@ import org.springframework.util.ReflectionUtils;
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 1.1
|
||||
* @see com.ibm.ws.rsadapter.jdbc.WSJdbcConnection
|
||||
* @see com.ibm.ws.rsadapter.jdbc.WSJdbcUtil#getNativeConnection
|
||||
*/
|
||||
public class WebSphereNativeJdbcExtractor extends NativeJdbcExtractorAdapter {
|
||||
|
||||
|
||||
@@ -50,17 +50,8 @@ import org.springframework.web.context.request.async.WebAsyncUtils;
|
||||
* transactions via {@link org.springframework.orm.hibernate4.HibernateTransactionManager}
|
||||
* as well as for non-transactional execution (if configured appropriately).
|
||||
*
|
||||
* <p><b>NOTE</b>: This interceptor will by default <i>not</i> flush the Hibernate
|
||||
* <code>Session</code>, with the flush mode being set to <code>FlushMode.NEVER</code>.
|
||||
* It assumes that it will be used in combination with service layer transactions
|
||||
* that handle the flushing: the active transaction manager will temporarily change
|
||||
* the flush mode to <code>FlushMode.AUTO</code> during a read-write transaction,
|
||||
* with the flush mode reset to <code>FlushMode.NEVER</code> at the end of each
|
||||
* transaction. If you intend to use this interceptor without transactions, consider
|
||||
* changing the default flush mode (through the {@link #setFlushMode "flushMode"} property).
|
||||
*
|
||||
* <p>In contrast to {@link OpenSessionInViewFilter}, this interceptor is configured
|
||||
* in a Spring application context and can thus take advantage of bean wiring..
|
||||
* in a Spring application context and can thus take advantage of bean wiring.
|
||||
*
|
||||
* <p><b>WARNING:</b> Applying this interceptor to existing logic can cause issues
|
||||
* that have not appeared before, through the use of a single Hibernate
|
||||
@@ -71,8 +62,6 @@ import org.springframework.web.context.request.async.WebAsyncUtils;
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 3.1
|
||||
* @see #setSingleSession
|
||||
* @see #setFlushMode
|
||||
* @see OpenSessionInViewFilter
|
||||
* @see org.springframework.orm.hibernate4.HibernateTransactionManager
|
||||
* @see org.springframework.transaction.support.TransactionSynchronizationManager
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
* Copyright 2002-2012 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.
|
||||
@@ -73,7 +73,7 @@ public class FilterDefinitionFactoryBean implements FactoryBean<FilterDefinition
|
||||
static {
|
||||
// Hibernate 3.6 TypeResolver class available?
|
||||
try {
|
||||
Class trClass = FilterDefinitionFactoryBean.class.getClassLoader().loadClass(
|
||||
Class<?> trClass = FilterDefinitionFactoryBean.class.getClassLoader().loadClass(
|
||||
"org.hibernate.type.TypeResolver");
|
||||
heuristicTypeMethod = trClass.getMethod("heuristicType", String.class);
|
||||
typeResolver = trClass.newInstance();
|
||||
@@ -109,7 +109,8 @@ public class FilterDefinitionFactoryBean implements FactoryBean<FilterDefinition
|
||||
/**
|
||||
* Set the parameter types for the filter,
|
||||
* with parameter names as keys and type names as values.
|
||||
* @see org.hibernate.type.TypeFactory#heuristicType(String)
|
||||
* See {@code org.hibernate.type.TypeFactory#heuristicType(String)} (Hibernate 3.x)
|
||||
* or {@code org.hibernate.type.TypeResolver#heuristicType(String)} (Hibernate 4.x)
|
||||
*/
|
||||
public void setParameterTypes(Map<String, String> parameterTypes) {
|
||||
if (parameterTypes != null) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2008 the original author or authors.
|
||||
* Copyright 2002-2012 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.
|
||||
@@ -432,7 +432,6 @@ public abstract class HibernateAccessor implements InitializingBean, BeanFactory
|
||||
* @param ex the SQLException
|
||||
* @return the corresponding DataAccessException instance
|
||||
* @see #setJdbcExceptionTranslator
|
||||
* @see org.hibernate.Session#connection()
|
||||
*/
|
||||
protected DataAccessException convertJdbcAccessException(SQLException ex) {
|
||||
SQLExceptionTranslator translator = getJdbcExceptionTranslator();
|
||||
|
||||
@@ -81,8 +81,6 @@ public interface HibernateOperations {
|
||||
* @return a result object returned by the action, or <code>null</code>
|
||||
* @throws org.springframework.dao.DataAccessException in case of Hibernate errors
|
||||
* @see HibernateTransactionManager
|
||||
* @see org.springframework.dao
|
||||
* @see org.springframework.transaction
|
||||
* @see org.hibernate.Session
|
||||
*/
|
||||
<T> T execute(HibernateCallback<T> action) throws DataAccessException;
|
||||
|
||||
@@ -520,9 +520,9 @@ public class LocalSessionFactoryBean extends AbstractSessionFactoryBean implemen
|
||||
* you can also pass in a list or set of listeners objects as value.
|
||||
* <p>See the Hibernate documentation for further details on listener types
|
||||
* and associated listener interfaces.
|
||||
* <p>See {@code org.hibernate.cfg.Configuration#setListener(String, Object)}
|
||||
* @param eventListeners Map with listener type Strings as keys and
|
||||
* listener objects as values
|
||||
* @see org.hibernate.cfg.Configuration#setListener(String, Object)
|
||||
*/
|
||||
public void setEventListeners(Map<String, Object> eventListeners) {
|
||||
this.eventListeners = eventListeners;
|
||||
|
||||
@@ -67,8 +67,6 @@ public interface JdoOperations {
|
||||
* @return a result object returned by the action, or <code>null</code>
|
||||
* @throws org.springframework.dao.DataAccessException in case of JDO errors
|
||||
* @see JdoTransactionManager
|
||||
* @see org.springframework.dao
|
||||
* @see org.springframework.transaction
|
||||
* @see javax.jdo.PersistenceManager
|
||||
*/
|
||||
<T> T execute(JdoCallback<T> action) throws DataAccessException;
|
||||
|
||||
@@ -45,7 +45,6 @@ public class XmlExpectationsHelper {
|
||||
|
||||
/**
|
||||
* Parse the content as {@link Node} and apply a {@link Matcher}.
|
||||
* @see org.hamcrest.Matchers#hasXPath
|
||||
*/
|
||||
public void assertNode(String content, Matcher<? super Node> matcher) throws Exception {
|
||||
Document document = parseXmlString(content);
|
||||
|
||||
@@ -56,7 +56,7 @@ public abstract class MockRestResponseCreators {
|
||||
/**
|
||||
* {@code ResponseCreator} for a 200 response (OK) with byte[] body.
|
||||
* @param body the response body
|
||||
* @param mediaType the type of the content, may be {@code null}
|
||||
* @param contentType the type of the content, may be {@code null}
|
||||
*/
|
||||
public static DefaultResponseCreator withSuccess(byte[] body, MediaType contentType) {
|
||||
return new DefaultResponseCreator(HttpStatus.OK).body(body).contentType(contentType);
|
||||
@@ -65,7 +65,7 @@ public abstract class MockRestResponseCreators {
|
||||
/**
|
||||
* {@code ResponseCreator} for a 200 response (OK) content with {@link Resource}-based body.
|
||||
* @param body the response body
|
||||
* @param mediaType the type of the content, may be {@code null}
|
||||
* @param contentType the type of the content, may be {@code null}
|
||||
*/
|
||||
public static DefaultResponseCreator withSuccess(Resource body, MediaType contentType) {
|
||||
return new DefaultResponseCreator(HttpStatus.OK).body(body).contentType(contentType);
|
||||
|
||||
@@ -40,7 +40,7 @@ public interface ResultMatcher {
|
||||
/**
|
||||
* Assert the result of an executed request.
|
||||
*
|
||||
* @param mvcResult the result of the executed request
|
||||
* @param result the result of the executed request
|
||||
* @throws Exception if a failure occurs
|
||||
*/
|
||||
void match(MvcResult result) throws Exception;
|
||||
|
||||
@@ -87,8 +87,8 @@ public abstract class MockMvcRequestBuilders {
|
||||
* @param urlTemplate a URL template; the resulting URL will be encoded
|
||||
* @param urlVariables zero or more URL variables
|
||||
*/
|
||||
public static MockHttpServletRequestBuilder request(HttpMethod httpMethod, String urlTemplate, Object... urlVars) {
|
||||
return new MockHttpServletRequestBuilder(httpMethod, urlTemplate, urlVars);
|
||||
public static MockHttpServletRequestBuilder request(HttpMethod httpMethod, String urlTemplate, Object... urlVariables) {
|
||||
return new MockHttpServletRequestBuilder(httpMethod, urlTemplate, urlVariables);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -147,8 +147,6 @@ public class ContentResultMatchers {
|
||||
/**
|
||||
* Parse the response content as {@link Node} and apply the given Hamcrest
|
||||
* {@link Matcher}.
|
||||
*
|
||||
* @see org.hamcrest.Matchers#hasXPath
|
||||
*/
|
||||
public ResultMatcher node(final Matcher<? super Node> matcher) {
|
||||
return new ResultMatcher() {
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.springframework.test.web.servlet.ResultMatcher;
|
||||
* Factory for assertions on the response content using <a
|
||||
* href="http://goessner.net/articles/JsonPath/">JSONPath</a> expressions.
|
||||
* An instance of this class is typically accessed via
|
||||
* {@link MockMvcResultMatchers#jsonPpath}.
|
||||
* {@link MockMvcResultMatchers#jsonPath}.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 3.2
|
||||
|
||||
@@ -56,8 +56,8 @@ public class DefaultMockMvcBuilder<Self extends MockMvcBuilder> extends MockMvcB
|
||||
|
||||
|
||||
/**
|
||||
* Protected constructor. Not intended for direct instantiation.
|
||||
* @see MockMvcBuilders#webAppContextSetup(WebApplicationContext)
|
||||
* Protected constructor. Not intended for direct instantiation.
|
||||
* @see MockMvcBuilders#webAppContextSetup(WebApplicationContext)
|
||||
*/
|
||||
protected DefaultMockMvcBuilder(WebApplicationContext webAppContext) {
|
||||
Assert.notNull(webAppContext, "WebApplicationContext is required");
|
||||
@@ -116,7 +116,6 @@ public class DefaultMockMvcBuilder<Self extends MockMvcBuilder> extends MockMvcB
|
||||
*
|
||||
* @param filter the filter to add
|
||||
* @param urlPatterns URL patterns to map to; if empty, "/*" is used by default
|
||||
* @return
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public final <T extends Self> T addFilter(Filter filter, String... urlPatterns) {
|
||||
|
||||
@@ -51,7 +51,7 @@ public class MockEnvironment extends AbstractEnvironment {
|
||||
* Convenient synonym for {@link #setProperty} that returns the current instance.
|
||||
* Useful for method chaining and fluent-style use.
|
||||
* @return this {@link MockEnvironment} instance
|
||||
* @see MockPropertySource#withProperty(String, String)
|
||||
* @see MockPropertySource#withProperty
|
||||
*/
|
||||
public MockEnvironment withProperty(String key, String value) {
|
||||
this.setProperty(key, value);
|
||||
|
||||
@@ -159,7 +159,7 @@ public class MockServletContext implements ServletContext {
|
||||
* Create a new MockServletContext using the supplied resource base path and
|
||||
* resource loader.
|
||||
* <p>Registers a {@link MockRequestDispatcher} for the Servlet named
|
||||
* {@value #COMMON_DEFAULT_SERVLET_NAME}.
|
||||
* {@linkplain #COMMON_DEFAULT_SERVLET_NAME "default"}.
|
||||
* @param resourceBasePath the root directory of the WAR (should not end with a slash)
|
||||
* @param resourceLoader the ResourceLoader to use (or null for the default)
|
||||
* @see #registerNamedDispatcher
|
||||
@@ -342,7 +342,7 @@ public class MockServletContext implements ServletContext {
|
||||
|
||||
/**
|
||||
* Get the name of the <em>default</em> {@code Servlet}.
|
||||
* <p>Defaults to {@value #COMMON_DEFAULT_SERVLET_NAME}.
|
||||
* <p>Defaults to {@linkplain #COMMON_DEFAULT_SERVLET_NAME "default"}.
|
||||
* @see #setDefaultServletName
|
||||
*/
|
||||
public String getDefaultServletName() {
|
||||
|
||||
@@ -76,7 +76,7 @@ package org.springframework.test;
|
||||
*
|
||||
* Intended for use with JUnit 4 and TestNG (as of Spring 3.0).
|
||||
* You might want to compare this class with the
|
||||
* {@link junit.extensions.ExceptionTestCase} class.
|
||||
* {@code junit.extensions.ExceptionTestCase} class.
|
||||
*
|
||||
* @author Rick Evans
|
||||
* @author Juergen Hoeller
|
||||
|
||||
@@ -124,7 +124,7 @@ public abstract class AbstractTransactionalJUnit4SpringContextTests extends Abst
|
||||
|
||||
/**
|
||||
* Count the rows in the given table, using the provided {@code WHERE} clause.
|
||||
* <p>See the Javadoc for {@link JdbcTestUtils#countRowsInTableWhere()} for details.
|
||||
* <p>See the Javadoc for {@link JdbcTestUtils#countRowsInTableWhere} for details.
|
||||
* @param tableName the name of the table to count rows in
|
||||
* @param whereClause the {@code WHERE} clause to append to the query
|
||||
* @return the number of rows in the table that match the provided
|
||||
|
||||
@@ -133,7 +133,7 @@ public abstract class AbstractGenericContextLoader extends AbstractContextLoader
|
||||
*
|
||||
* <p><b>Note</b>: this method does not provide a means to set active bean definition
|
||||
* profiles for the loaded context. See {@link #loadContext(MergedContextConfiguration)}
|
||||
* and {@link #prepareContext(GenericApplicationContext, MergedContextConfiguration)}
|
||||
* and {@link AbstractContextLoader#prepareContext(ConfigurableApplicationContext, MergedContextConfiguration)}
|
||||
* for an alternative.
|
||||
*
|
||||
* @return a new application context
|
||||
|
||||
@@ -155,7 +155,7 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
|
||||
* {@link AnnotatedBeanDefinitionReader} is used to register the appropriate
|
||||
* bean definitions.
|
||||
*
|
||||
* <p>Note that this method does not call {@link #createBeanDefinitionReader()}
|
||||
* <p>Note that this method does not call {@link #createBeanDefinitionReader}
|
||||
* since <code>AnnotatedBeanDefinitionReader</code> is not an instance of
|
||||
* {@link BeanDefinitionReader}.
|
||||
*
|
||||
|
||||
@@ -115,7 +115,7 @@ public abstract class AbstractTransactionalTestNGSpringContextTests extends Abst
|
||||
|
||||
/**
|
||||
* Count the rows in the given table, using the provided {@code WHERE} clause.
|
||||
* <p>See the Javadoc for {@link JdbcTestUtils#countRowsInTableWhere()} for details.
|
||||
* <p>See the Javadoc for {@link JdbcTestUtils#countRowsInTableWhere} for details.
|
||||
* @param tableName the name of the table to count rows in
|
||||
* @param whereClause the {@code WHERE} clause to append to the query
|
||||
* @return the number of rows in the table that match the provided
|
||||
|
||||
@@ -49,7 +49,7 @@ import org.springframework.web.context.support.GenericWebApplicationContext;
|
||||
* {@link org.springframework.test.context.ContextLoader ContextLoader} SPI.
|
||||
*
|
||||
* <p>Concrete subclasses must provide an appropriate implementation of
|
||||
* {@link #loadBeanDefinitions()}.
|
||||
* {@link #loadBeanDefinitions}.
|
||||
*
|
||||
* @author Sam Brannen
|
||||
* @since 3.2
|
||||
@@ -71,18 +71,18 @@ public abstract class AbstractGenericWebContextLoader extends AbstractContextLoa
|
||||
*
|
||||
* <ul>
|
||||
* <li>Creates a {@link GenericWebApplicationContext} instance.</li>
|
||||
* <li>Delegates to {@link #configureWebResources()} to create the
|
||||
* <li>Delegates to {@link #configureWebResources} to create the
|
||||
* {@link MockServletContext} and set it in the {@code WebApplicationContext}.</li>
|
||||
* <li>Calls {@link #prepareContext()} to allow for customizing the context
|
||||
* <li>Calls {@link #prepareContext} to allow for customizing the context
|
||||
* before bean definitions are loaded.</li>
|
||||
* <li>Calls {@link #customizeBeanFactory()} to allow for customizing the
|
||||
* <li>Calls {@link #customizeBeanFactory} to allow for customizing the
|
||||
* context's {@code DefaultListableBeanFactory}.</li>
|
||||
* <li>Delegates to {@link #loadBeanDefinitions()} to populate the context
|
||||
* <li>Delegates to {@link #loadBeanDefinitions} to populate the context
|
||||
* from the locations or classes in the supplied {@code MergedContextConfiguration}.</li>
|
||||
* <li>Delegates to {@link AnnotationConfigUtils} for
|
||||
* {@linkplain AnnotationConfigUtils#registerAnnotationConfigProcessors registering}
|
||||
* annotation configuration processors.</li>
|
||||
* <li>Calls {@link #customizeContext()} to allow for customizing the context
|
||||
* <li>Calls {@link #customizeContext} to allow for customizing the context
|
||||
* before it is refreshed.</li>
|
||||
* <li>{@link ConfigurableApplicationContext#refresh Refreshes} the
|
||||
* context and registers a JVM shutdown hook for it.</li>
|
||||
|
||||
@@ -30,8 +30,7 @@ public class GenericXmlWebContextLoader extends AbstractGenericWebContextLoader
|
||||
|
||||
/**
|
||||
* Loads bean definitions using an {@link XmlBeanDefinitionReader}.
|
||||
*
|
||||
* @see AbstractGenericWebContextLoader#loadBeanDefinitions()
|
||||
* @see AbstractGenericWebContextLoader#loadBeanDefinitions
|
||||
*/
|
||||
@Override
|
||||
protected void loadBeanDefinitions(GenericWebApplicationContext context,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
* Copyright 2002-2012 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.
|
||||
@@ -33,7 +33,6 @@ import org.springframework.util.ReflectionUtils;
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 2.5.2
|
||||
* @see com.sun.enterprise.connectors.work.WorkManagerFactory
|
||||
*/
|
||||
public class GlassFishWorkManagerTaskExecutor extends WorkManagerTaskExecutor {
|
||||
|
||||
|
||||
@@ -61,9 +61,6 @@ import org.springframework.util.ClassUtils;
|
||||
* @since 2.0.3
|
||||
* @see org.springframework.transaction.TransactionDefinition#getName
|
||||
* @see org.springframework.transaction.TransactionDefinition#getIsolationLevel
|
||||
* @see oracle.j2ee.transaction.OC4JTransactionManager#begin(String)
|
||||
* @see oracle.j2ee.transaction.OC4JTransaction#setTransactionIsolation
|
||||
* @see oracle.j2ee.transaction.TransactionUtility
|
||||
* @deprecated as of Spring 3.2, in favor of {@link WebLogicJtaTransactionManager}
|
||||
* since Oracle end-of-lifed OC4J in favor of WebLogic
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2010 the original author or authors.
|
||||
* Copyright 2002-2012 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.
|
||||
@@ -43,7 +43,7 @@ public class ProxyFactoryBean implements FactoryBean<Proxy>, InitializingBean {
|
||||
private Proxy proxy;
|
||||
|
||||
/**
|
||||
* Sets the proxy type. Defaults to {@link Proxy.Type#HTTP}.
|
||||
* Sets the proxy type. Defaults to {@link java.net.Proxy.Type#HTTP}.
|
||||
*/
|
||||
public void setType(Proxy.Type type) {
|
||||
this.type = type;
|
||||
|
||||
@@ -50,7 +50,6 @@ public interface GenericHttpMessageConverter<T> extends HttpMessageConverter<T>
|
||||
* @param type the type of object to return. This type must have previously
|
||||
* been passed to the {@link #canRead canRead} method of this interface,
|
||||
* which must have returned {@code true}.
|
||||
* @param type the type of the target object
|
||||
* @param contextClass a context class for the target type, for example a class
|
||||
* in which the target type appears in a method signature, can be {@code null}
|
||||
* @param inputMessage the HTTP input message to read from
|
||||
|
||||
@@ -221,8 +221,8 @@ public class Jackson2ObjectMapperFactoryBean implements FactoryBean<ObjectMapper
|
||||
* @see MapperFeature
|
||||
* @see SerializationFeature
|
||||
* @see DeserializationFeature
|
||||
* @see JsonParser.Feature
|
||||
* @see JsonGenerator.Feature
|
||||
* @see org.codehaus.jackson.map.JsonParser.Feature
|
||||
* @see org.codehaus.jackson.map.JsonGenerator.Feature
|
||||
*/
|
||||
public void setFeaturesToEnable(Object... featuresToEnable) {
|
||||
if (featuresToEnable != null) {
|
||||
@@ -238,8 +238,8 @@ public class Jackson2ObjectMapperFactoryBean implements FactoryBean<ObjectMapper
|
||||
* @see MapperFeature
|
||||
* @see SerializationFeature
|
||||
* @see DeserializationFeature
|
||||
* @see JsonParser.Feature
|
||||
* @see JsonGenerator.Feature
|
||||
* @see org.codehaus.jackson.map.JsonParser.Feature
|
||||
* @see org.codehaus.jackson.map.JsonGenerator.Feature
|
||||
*/
|
||||
public void setFeaturesToDisable(Object... featuresToDisable) {
|
||||
if (featuresToDisable != null) {
|
||||
|
||||
@@ -128,8 +128,8 @@ public class JacksonObjectMapperFactoryBean implements FactoryBean<ObjectMapper>
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcut for {@link SerializationConfig.Feature#AUTO_DETECT_FIELDS} and
|
||||
* {@link DeserializationConfig.Feature#AUTO_DETECT_FIELDS}.
|
||||
* Shortcut for {@link org.codehaus.jackson.map.SerializationConfig.Feature#AUTO_DETECT_FIELDS} and
|
||||
* {@link org.codehaus.jackson.map.DeserializationConfig.Feature#AUTO_DETECT_FIELDS}.
|
||||
*/
|
||||
public void setAutoDetectFields(boolean autoDetectFields) {
|
||||
this.features.put(DeserializationConfig.Feature.AUTO_DETECT_FIELDS, autoDetectFields);
|
||||
@@ -137,8 +137,8 @@ public class JacksonObjectMapperFactoryBean implements FactoryBean<ObjectMapper>
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcut for {@link SerializationConfig.Feature#AUTO_DETECT_GETTERS} and
|
||||
* {@link DeserializationConfig.Feature#AUTO_DETECT_SETTERS}.
|
||||
* Shortcut for {@link org.codehaus.jackson.map.SerializationConfig.Feature#AUTO_DETECT_GETTERS} and
|
||||
* {@link org.codehaus.jackson.map.DeserializationConfig.Feature#AUTO_DETECT_SETTERS}.
|
||||
*/
|
||||
public void setAutoDetectGettersSetters(boolean autoDetectGettersSetters) {
|
||||
this.features.put(SerializationConfig.Feature.AUTO_DETECT_GETTERS, autoDetectGettersSetters);
|
||||
@@ -146,14 +146,14 @@ public class JacksonObjectMapperFactoryBean implements FactoryBean<ObjectMapper>
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcut for {@link SerializationConfig.Feature#FAIL_ON_EMPTY_BEANS}.
|
||||
* Shortcut for {@link org.codehaus.jackson.map.SerializationConfig.Feature#FAIL_ON_EMPTY_BEANS}.
|
||||
*/
|
||||
public void setFailOnEmptyBeans(boolean failOnEmptyBeans) {
|
||||
this.features.put(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, failOnEmptyBeans);
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcut for {@link SerializationConfig.Feature#INDENT_OUTPUT}.
|
||||
* Shortcut for {@link org.codehaus.jackson.map.SerializationConfig.Feature#INDENT_OUTPUT}.
|
||||
*/
|
||||
public void setIndentOutput(boolean indentOutput) {
|
||||
this.features.put(SerializationConfig.Feature.INDENT_OUTPUT, indentOutput);
|
||||
@@ -162,10 +162,10 @@ public class JacksonObjectMapperFactoryBean implements FactoryBean<ObjectMapper>
|
||||
/**
|
||||
* Specify features to enable.
|
||||
*
|
||||
* @see SerializationConfig.Feature
|
||||
* @see DeserializationConfig.Feature
|
||||
* @see JsonParser.Feature
|
||||
* @see JsonGenerator.Feature
|
||||
* @see org.codehaus.jackson.map.SerializationConfig.Feature
|
||||
* @see org.codehaus.jackson.map.DeserializationConfig.Feature
|
||||
* @see org.codehaus.jackson.map.JsonParser.Feature
|
||||
* @see org.codehaus.jackson.map.JsonGenerator.Feature
|
||||
*/
|
||||
public void setFeaturesToEnable(Object[] featuresToEnable) {
|
||||
if (featuresToEnable != null) {
|
||||
@@ -178,10 +178,10 @@ public class JacksonObjectMapperFactoryBean implements FactoryBean<ObjectMapper>
|
||||
/**
|
||||
* Specify features to disable.
|
||||
*
|
||||
* @see SerializationConfig.Feature
|
||||
* @see DeserializationConfig.Feature
|
||||
* @see JsonParser.Feature
|
||||
* @see JsonGenerator.Feature
|
||||
* @see org.codehaus.jackson.map.SerializationConfig.Feature
|
||||
* @see org.codehaus.jackson.map.DeserializationConfig.Feature
|
||||
* @see org.codehaus.jackson.map.JsonParser.Feature
|
||||
* @see org.codehaus.jackson.map.JsonGenerator.Feature
|
||||
*/
|
||||
public void setFeaturesToDisable(Object[] featuresToDisable) {
|
||||
if (featuresToDisable != null) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2009 the original author or authors.
|
||||
* Copyright 2002-2012 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,12 +25,6 @@ import javax.xml.rpc.Service;
|
||||
* or one of its subclasses: {@link LocalJaxRpcServiceFactoryBean},
|
||||
* {@link JaxRpcPortClientInterceptor}, or {@link JaxRpcPortProxyFactoryBean}.
|
||||
*
|
||||
* <p>Useful, for example, to register custom type mappings. See the
|
||||
* {@link org.springframework.remoting.jaxrpc.support.AxisBeanMappingServicePostProcessor}
|
||||
* class that registers Axis-specific bean mappings for specified bean classes.
|
||||
* This is defined for the domain objects in the JPetStore same application,
|
||||
* for example.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 1.1.4
|
||||
* @see LocalJaxRpcServiceFactory#setServicePostProcessors
|
||||
|
||||
@@ -84,7 +84,7 @@ public class ContentNegotiationManager implements ContentNegotiationStrategy, Me
|
||||
* implement {@link MediaTypeFileExtensionResolver} and the class constructor
|
||||
* accepting the former will also detect implementations of the latter. Therefore
|
||||
* you only need to use this method to register additional instances.
|
||||
* @param one more resolvers
|
||||
* @param resolvers one or more resolvers
|
||||
*/
|
||||
public void addFileExtensionResolvers(MediaTypeFileExtensionResolver... resolvers) {
|
||||
this.fileExtensionResolvers.addAll(Arrays.asList(resolvers));
|
||||
@@ -93,7 +93,7 @@ public class ContentNegotiationManager implements ContentNegotiationStrategy, Me
|
||||
/**
|
||||
* Delegate to all configured ContentNegotiationStrategy instances until one
|
||||
* returns a non-empty list.
|
||||
* @param request the current request
|
||||
* @param webRequest the current request
|
||||
* @return the requested media types or an empty list, never {@code null}
|
||||
* @throws HttpMediaTypeNotAcceptableException if the requested media types cannot be parsed
|
||||
*/
|
||||
|
||||
@@ -37,7 +37,7 @@ import org.springframework.web.context.ServletContextAware;
|
||||
* <p>By default strategies for checking the extension of the request path and
|
||||
* the {@code Accept} header are registered. The path extension check will perform
|
||||
* lookups through the {@link ServletContext} and the Java Activation Framework
|
||||
* (if present) unless {@linkplain #setMediaTypes(Map) media types} are configured.
|
||||
* (if present) unless {@linkplain #setMediaTypes(Properties) media types} are configured.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 3.2
|
||||
@@ -99,7 +99,7 @@ public class ContentNegotiationManagerFactoryBean
|
||||
* {@link #setFavorPathExtension(boolean)} is set to {@code true}.
|
||||
* <p>The default value is {@code true}.
|
||||
* @see #parameterName
|
||||
* @see #setMediaTypes(Map)
|
||||
* @see #setMediaTypes(Properties)
|
||||
*/
|
||||
public void setUseJaf(boolean useJaf) {
|
||||
this.useJaf = useJaf;
|
||||
@@ -113,7 +113,7 @@ public class ContentNegotiationManagerFactoryBean
|
||||
* for {@code /hotels?format=pdf} will be interpreted as a request for
|
||||
* {@code "application/pdf"} regardless of the {@code Accept} header.
|
||||
* <p>To use this option effectively you must also configure the MediaType
|
||||
* type mappings via {@link #setMediaTypes(Map)}.
|
||||
* type mappings via {@link #setMediaTypes(Properties)}.
|
||||
* @see #setParameterName(String)
|
||||
*/
|
||||
public void setFavorParameter(boolean favorParameter) {
|
||||
|
||||
@@ -34,7 +34,7 @@ public interface ContentNegotiationStrategy {
|
||||
* Resolve the given request to a list of media types. The returned list is
|
||||
* ordered by specificity first and by quality parameter second.
|
||||
*
|
||||
* @param request the current request
|
||||
* @param webRequest the current request
|
||||
* @return the requested media types or an empty list, never {@code null}
|
||||
*
|
||||
* @throws HttpMediaTypeNotAcceptableException if the requested media types cannot be parsed
|
||||
|
||||
@@ -109,7 +109,7 @@ import java.util.concurrent.Callable;
|
||||
* converters}. Such parameters may optionally be annotated with {@code @Valid}
|
||||
* and also support access to validation results through an
|
||||
* {@link org.springframework.validation.Errors} argument.
|
||||
* Instead a {@link org.springframework.web.servlet.mvc.method.annotation.MethodArgumentNotValidException}
|
||||
* Instead a {@link org.springframework.web.bind.MethodArgumentNotValidException}
|
||||
* exception is raised.
|
||||
* <li>{@link RequestPart @RequestPart} annotated parameters
|
||||
* (Servlet-only, {@literal @MVC 3.1-only})
|
||||
@@ -120,7 +120,7 @@ import java.util.concurrent.Callable;
|
||||
* converters}. Such parameters may optionally be annotated with {@code @Valid}
|
||||
* and support access to validation results through a
|
||||
* {@link org.springframework.validation.Errors} argument.
|
||||
* Instead a {@link org.springframework.web.servlet.mvc.method.annotation.MethodArgumentNotValidException}
|
||||
* Instead a {@link org.springframework.web.bind.MethodArgumentNotValidException}
|
||||
* exception is raised.
|
||||
* <li>{@link org.springframework.http.HttpEntity HttpEntity<?>} parameters
|
||||
* (Servlet-only) for access to the Servlet request HTTP headers and contents.
|
||||
|
||||
@@ -139,7 +139,7 @@ public class DeferredResult<T> {
|
||||
/**
|
||||
* Provide a handler to use to handle the result value.
|
||||
* @param resultHandler the handler
|
||||
* @see {@link DeferredResultProcessingInterceptor}
|
||||
* @see DeferredResultProcessingInterceptor
|
||||
*/
|
||||
public final void setResultHandler(DeferredResultHandler resultHandler) {
|
||||
Assert.notNull(resultHandler, "DeferredResultHandler is required");
|
||||
|
||||
@@ -51,9 +51,8 @@ import org.springframework.web.util.UrlPathHelper;
|
||||
*
|
||||
* @see org.springframework.web.context.request.AsyncWebRequestInterceptor
|
||||
* @see org.springframework.web.servlet.AsyncHandlerInterceptor
|
||||
* @see org.springframework.web.filter.OncePerRequestFilter#shouldFilterAsyncDispatches
|
||||
* @see org.springframework.web.filter.OncePerRequestFilter#shouldNotFilterAsyncDispatch
|
||||
* @see org.springframework.web.filter.OncePerRequestFilter#isAsyncDispatch
|
||||
* @see org.springframework.web.filter.OncePerRequestFilter#isLastRequestThread
|
||||
*/
|
||||
public final class WebAsyncManager {
|
||||
|
||||
@@ -195,7 +194,7 @@ public final class WebAsyncManager {
|
||||
/**
|
||||
* Register a {@link CallableProcessingInterceptor} without a key.
|
||||
* The key is derived from the class name and hashcode.
|
||||
* @param interceptor the interceptor to register
|
||||
* @param interceptors one or more interceptors to register
|
||||
*/
|
||||
public void registerCallableInterceptors(CallableProcessingInterceptor... interceptors) {
|
||||
Assert.notNull(interceptors, "A CallableProcessingInterceptor is required");
|
||||
@@ -219,8 +218,7 @@ public final class WebAsyncManager {
|
||||
/**
|
||||
* Register a {@link DeferredResultProcessingInterceptor} without a key.
|
||||
* The key is derived from the class name and hashcode.
|
||||
* @param key the key
|
||||
* @param interceptors the interceptor to register
|
||||
* @param interceptors one or more interceptors to register
|
||||
*/
|
||||
public void registerDeferredResultInterceptors(DeferredResultProcessingInterceptor... interceptors) {
|
||||
Assert.notNull(interceptors, "A DeferredResultProcessingInterceptor is required");
|
||||
|
||||
@@ -70,7 +70,7 @@ public class StandardServletEnvironment extends StandardEnvironment
|
||||
* environment variables contributed by the {@link StandardEnvironment} superclass.
|
||||
* <p>The {@code Servlet}-related property sources are added as {@link
|
||||
* StubPropertySource stubs} at this stage, and will be {@linkplain
|
||||
* #initPropertySources(ServletContext) fully initialized} once the actual
|
||||
* #initPropertySources(ServletContext, ServletConfig) fully initialized} once the actual
|
||||
* {@link ServletContext} object becomes available.
|
||||
* @see StandardEnvironment#customizePropertySources
|
||||
* @see org.springframework.core.env.AbstractEnvironment#customizePropertySources
|
||||
@@ -78,7 +78,7 @@ public class StandardServletEnvironment extends StandardEnvironment
|
||||
* @see ServletContextPropertySource
|
||||
* @see org.springframework.jndi.JndiPropertySource
|
||||
* @see org.springframework.context.support.AbstractApplicationContext#initPropertySources
|
||||
* @see #initPropertySources(ServletContext)
|
||||
* @see #initPropertySources(ServletContext, ServletConfig)
|
||||
*/
|
||||
@Override
|
||||
protected void customizePropertySources(MutablePropertySources propertySources) {
|
||||
|
||||
@@ -247,7 +247,8 @@ public abstract class WebApplicationContextUtils {
|
||||
* <p>This method is idempotent with respect to the fact it may be called any number
|
||||
* of times but will perform replacement of stub property sources with their
|
||||
* corresponding actual property sources once and only once.
|
||||
* @param propertySources the {@link PropertySources} to initialize (must not be {@code null})
|
||||
* @param propertySources the {@link MutablePropertySources} to initialize (must not
|
||||
* be {@code null})
|
||||
* @param servletContext the current {@link ServletContext} (ignored if {@code null}
|
||||
* or if the {@link StandardServletEnvironment#SERVLET_CONTEXT_PROPERTY_SOURCE_NAME
|
||||
* servlet context property source} has already been initialized)
|
||||
|
||||
@@ -188,15 +188,16 @@ public abstract class PortletApplicationContextUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace {@code Servlet}- and {@code Portlet}-based {@link StubPropertySource stub
|
||||
* property sources} with actual instances populated with the given {@code servletContext},
|
||||
* Replace {@code Servlet}- and {@code Portlet}-based {@link
|
||||
* org.springframework.core.env.PropertySource.StubPropertySource stub property
|
||||
* sources} with actual instances populated with the given {@code servletContext},
|
||||
* {@code portletContext} and {@code portletConfig} objects.
|
||||
* <p>This method is idempotent with respect to the fact it may be called any number
|
||||
* of times but will perform replacement of stub property sources with their
|
||||
* corresponding actual property sources once and only once.
|
||||
* @param propertySources the {@link PropertySources} to initialize (must not be {@code null})
|
||||
* @param propertySources the {@link MutablePropertySources} to initialize (must not be {@code null})
|
||||
* @param servletContext the current {@link ServletContext} (ignored if {@code null}
|
||||
* or if the {@link StandardServletEnvironment#SERVLET_CONTEXT_PROPERTY_SOURCE_NAME
|
||||
* or if the {@link org.springframework.web.context.support.StandardServletEnvironment#SERVLET_CONTEXT_PROPERTY_SOURCE_NAME
|
||||
* servlet context property source} has already been initialized)
|
||||
* @param portletContext the current {@link PortletContext} (ignored if {@code null}
|
||||
* or if the {@link StandardPortletEnvironment#PORTLET_CONTEXT_PROPERTY_SOURCE_NAME
|
||||
|
||||
@@ -6,19 +6,18 @@
|
||||
* comes with Spring. Provides both abstract base classes and concrete
|
||||
* implementations for often seen use cases.
|
||||
* </p>
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* A <code>Controller</code> - as defined in this package - is analogous to a Struts
|
||||
* <code>Action</code>. Usually <code>Controllers</code> are JavaBeans
|
||||
* to allow easy configuration using the {@link org.springframework.beans org.springframework.beans}
|
||||
* package. Controllers define the <code>C</code> from so-called MVC paradigm
|
||||
* and can be used in conjunction with the {@link org.springframework.web.portlet.ModelAndView ModelAndView}
|
||||
* to achieve interactive applications. The view might be represented by a
|
||||
* HTML interface, but, because of model and the controller being completely
|
||||
* independent of the view, PDF views are possible, as well as for instance Excel
|
||||
* views.
|
||||
* to allow easy configuration. Controllers define the <code>C</code> from so-called
|
||||
* MVC paradigm and can be used in conjunction with the {@link
|
||||
* org.springframework.web.portlet.ModelAndView ModelAndView} to achieve interactive
|
||||
* applications. The view might be represented by a HTML interface, but, because of
|
||||
* model and the controller being completely independent of the view, PDF views are
|
||||
* possible, as well as for instance Excel views.
|
||||
* </p>
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* Especially useful to read, while getting into the Spring MVC framework
|
||||
* are the following:
|
||||
|
||||
@@ -244,7 +244,6 @@ public class TilesConfigurer implements ServletContextAware, InitializingBean, D
|
||||
* Creates and exposes a TilesContainer for this web application,
|
||||
* delegating to the TilesInitializer.
|
||||
* @throws TilesException in case of setup failure
|
||||
* @see #createTilesInitializer()
|
||||
*/
|
||||
public void afterPropertiesSet() throws TilesException {
|
||||
|
||||
|
||||
@@ -38,8 +38,8 @@ public class TilesViewResolver extends UrlBasedViewResolver {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the {@link Renderer} to use.
|
||||
* If not set, by default {@link DefinitionRenderer} is used.
|
||||
* Set the {@link Renderer} to use. If not set, by default
|
||||
* {@link org.apache.tiles.renderer.DefinitionRenderer} is used.
|
||||
* @see TilesView#setRenderer(Renderer)
|
||||
*/
|
||||
public void setRenderer(Renderer renderer) {
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.web.method.HandlerMethod;
|
||||
* exits without invoking {@code postHandle} and {@code afterCompletion}, as it
|
||||
* normally does, since the results of request handling (e.g. ModelAndView)
|
||||
* will. be produced concurrently in another thread. In such scenarios,
|
||||
* {@link #afterConcurrentHandlingStarted(HttpServletRequest, HttpServletResponse)}
|
||||
* {@link #afterConcurrentHandlingStarted(HttpServletRequest, HttpServletResponse, Object)}
|
||||
* is invoked instead allowing implementations to perform tasks such as cleaning
|
||||
* up thread bound attributes.
|
||||
*
|
||||
|
||||
@@ -783,8 +783,6 @@ public abstract class FrameworkServlet extends HttpServletBean {
|
||||
/**
|
||||
* Override the parent class implementation in order to intercept PATCH
|
||||
* requests.
|
||||
*
|
||||
* @see #doPatch(HttpServletRequest, HttpServletResponse)
|
||||
*/
|
||||
@Override
|
||||
protected void service(HttpServletRequest request, HttpServletResponse response)
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.web.accept.ContentNegotiationManagerFactoryBean;
|
||||
* <p>By default strategies for checking the extension of the request path and
|
||||
* the {@code Accept} header are registered. The path extension check will perform
|
||||
* lookups through the {@link ServletContext} and the Java Activation Framework
|
||||
* (if present) unless {@linkplain #setMediaTypes(Map) media types} are configured.
|
||||
* (if present) unless {@linkplain #mediaTypes(Map) media types} are configured.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 3.2
|
||||
@@ -97,7 +97,7 @@ public class ContentNegotiationConfigurer {
|
||||
* {@link #favorPathExtension(boolean)} is set to {@code true}.
|
||||
* <p>The default value is {@code true}.
|
||||
* @see #parameterName
|
||||
* @see #setMediaTypes(Map)
|
||||
* @see #mediaTypes(Map)
|
||||
*/
|
||||
public ContentNegotiationConfigurer useJaf(boolean useJaf) {
|
||||
this.factoryBean.setUseJaf(useJaf);
|
||||
@@ -112,7 +112,7 @@ public class ContentNegotiationConfigurer {
|
||||
* for {@code /hotels?format=pdf} will be interpreted as a request for
|
||||
* {@code "application/pdf"} regardless of the {@code Accept} header.
|
||||
* <p>To use this option effectively you must also configure the MediaType
|
||||
* type mappings via {@link #setMediaTypes(Map)}.
|
||||
* type mappings via {@link #mediaTypes(Map)}.
|
||||
* @see #parameterName(String)
|
||||
*/
|
||||
public ContentNegotiationConfigurer favorParameter(boolean favorParameter) {
|
||||
@@ -122,7 +122,7 @@ public class ContentNegotiationConfigurer {
|
||||
|
||||
/**
|
||||
* Set the parameter name that can be used to determine the requested media type
|
||||
* if the {@link #setFavorParameter} property is {@code true}.
|
||||
* if the {@link #favorParameter(boolean)} property is {@code true}.
|
||||
* <p>The default parameter name is {@code "format"}.
|
||||
*/
|
||||
public ContentNegotiationConfigurer parameterName(String parameterName) {
|
||||
|
||||
@@ -48,7 +48,8 @@ public final class MappedInterceptor {
|
||||
|
||||
/**
|
||||
* Create a new MappedInterceptor instance.
|
||||
* @param pathPatterns the path patterns to map with a {@code null} value matching to all paths
|
||||
* @param includePatterns the path patterns to map with a {@code null} value matching to all paths
|
||||
* @param excludePatterns the path patterns to exclude
|
||||
* @param interceptor the HandlerInterceptor instance to map to the given patterns
|
||||
*/
|
||||
public MappedInterceptor(String[] includePatterns, String[] excludePatterns, HandlerInterceptor interceptor) {
|
||||
|
||||
@@ -76,7 +76,7 @@ public final class ProducesRequestCondition extends AbstractRequestCondition<Pro
|
||||
* accepting a {@link ContentNegotiationManager}.
|
||||
* @param produces expressions with syntax defined by {@link RequestMapping#produces()}
|
||||
* @param headers expressions with syntax defined by {@link RequestMapping#headers()}
|
||||
* @param contentNegotiationManager used to determine requested media types
|
||||
* @param manager used to determine requested media types
|
||||
*/
|
||||
public ProducesRequestCondition(String[] produces, String[] headers,
|
||||
ContentNegotiationManager manager) {
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
|
||||
/**
|
||||
*
|
||||
* MVC infrastructure for annotation-based handler method processing,
|
||||
* building on the <code>org.springframework.web.method.annotation</code> package.
|
||||
* Entry points are {@link RequestMappingHandlerMapping} and {@link RequestMappingHandlerAdapter}.
|
||||
*
|
||||
* Entry points are {@link org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping}
|
||||
* and {@link org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter}.
|
||||
*/
|
||||
package org.springframework.web.servlet.mvc.method.annotation;
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
* <p>
|
||||
* A <code>Controller</code> - as defined in this package - is analogous to a Struts
|
||||
* <code>Action</code>. Usually <code>Controllers</code> are JavaBeans
|
||||
* to allow easy configuration using the {@link org.springframework.beans org.springframework.beans}
|
||||
* package. Controllers define the <code>C</code> from so-called MVC paradigm
|
||||
* and can be used in conjunction with the {@link org.springframework.web.servlet.ModelAndView ModelAndView}
|
||||
* to allow easy configuration. Controllers define the <code>C</code> from so-called
|
||||
* MVC paradigm and can be used in conjunction with the
|
||||
* {@link org.springframework.web.servlet.ModelAndView ModelAndView}
|
||||
* to achieve interactive applications. The view might be represented by a
|
||||
* HTML interface, but, because of model and the controller being completely
|
||||
* independent of the view, PDF views are possible, as well as for instance Excel
|
||||
|
||||
@@ -71,7 +71,7 @@ import org.springframework.web.servlet.mvc.multiaction.NoSuchRequestHandlingMeth
|
||||
* @see #handleHttpMessageNotWritable
|
||||
* @see #handleMethodArgumentNotValidException
|
||||
* @see #handleMissingServletRequestParameter
|
||||
* @see #handleMissingServletRequestPart
|
||||
* @see #handleMissingServletRequestPartException
|
||||
* @see #handleBindException
|
||||
*/
|
||||
public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionResolver {
|
||||
|
||||
@@ -137,7 +137,7 @@ public abstract class AbstractDispatcherServletInitializer
|
||||
* Specify filters to add and also map to the {@code DispatcherServlet}.
|
||||
*
|
||||
* @return an array of filters or {@code null}
|
||||
* @see #registerServletFilters(ServletContext, String, Filter...)
|
||||
* @see #registerServletFilter(ServletContext, Filter)
|
||||
*/
|
||||
protected Filter[] getServletFilters() {
|
||||
return null;
|
||||
@@ -158,8 +158,7 @@ public abstract class AbstractDispatcherServletInitializer
|
||||
* filters directly with the {@code ServletContext}.
|
||||
*
|
||||
* @param servletContext the servlet context to register filters with
|
||||
* @param servletName the name of the servlet to map the filters to
|
||||
* @param filters the filters to be registered
|
||||
* @param filter the filter to be registered
|
||||
* @return the filter registration
|
||||
*/
|
||||
protected FilterRegistration.Dynamic registerServletFilter(ServletContext servletContext, Filter filter) {
|
||||
|
||||
@@ -297,11 +297,6 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
|
||||
|
||||
/**
|
||||
* Determines the list of {@link MediaType} for the given {@link HttpServletRequest}.
|
||||
* <p>The default implementation invokes {@link #getMediaTypeFromFilename(String)} if {@linkplain
|
||||
* #setFavorPathExtension favorPathExtension} property is <code>true</code>. If the property is
|
||||
* <code>false</code>, or when a media type cannot be determined from the request path,
|
||||
* this method will inspect the {@code Accept} header of the request.
|
||||
* <p>This method can be overridden to provide a different algorithm.
|
||||
* @param request the current servlet request
|
||||
* @return the list of media types requested, if any
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user