diff --git a/spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionInterceptor.java index 6039ce304cda..1cc6f8e0221a 100644 --- a/spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionInterceptor.java +++ b/spring-aop/src/main/java/org/springframework/aop/interceptor/AsyncExecutionInterceptor.java @@ -32,7 +32,7 @@ /** * AOP Alliance MethodInterceptor that processes method invocations * asynchronously, using a given {@link org.springframework.core.task.AsyncTaskExecutor}. - * Typically used with the {@link org.springframework.context.task.Async} annotation. + * Typically used with the {@link org.springframework.scheduling.annotation.Async} annotation. * *

In terms of target method signatures, any parameter types are supported. * However, the return type is constrained to either void or diff --git a/spring-aop/src/main/java/org/springframework/aop/target/AbstractPrototypeBasedTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/AbstractPrototypeBasedTargetSource.java index 83c8083e5b74..f2677afbc210 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/AbstractPrototypeBasedTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/AbstractPrototypeBasedTargetSource.java @@ -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. @@ -28,8 +28,9 @@ import org.springframework.beans.factory.config.ConfigurableBeanFactory; /** - * Base class for dynamic {@link TargetSource} implementations that create new prototype - * bean instances to support a pooling or new-instance-per-invocation strategy. + * Base class for dynamic {@link org.springframework.aop.TargetSource} implementations + * that create new prototype bean instances to support a pooling or + * new-instance-per-invocation strategy. * *

Such TargetSources must run in a {@link BeanFactory}, as it needs to * call the getBean method to create a new prototype instance. diff --git a/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-3.2.xsd b/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-3.2.xsd new file mode 100644 index 000000000000..7dae8fc44690 --- /dev/null +++ b/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-3.2.xsd @@ -0,0 +1,410 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/spring-aspects/src/main/java/org/springframework/scheduling/aspectj/AspectJAsyncConfiguration.java b/spring-aspects/src/main/java/org/springframework/scheduling/aspectj/AspectJAsyncConfiguration.java index d9d677a57093..c2df8e984dbc 100644 --- a/spring-aspects/src/main/java/org/springframework/scheduling/aspectj/AspectJAsyncConfiguration.java +++ b/spring-aspects/src/main/java/org/springframework/scheduling/aspectj/AspectJAsyncConfiguration.java @@ -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. @@ -31,7 +31,7 @@ * @author Chris Beams * @since 3.1 * @see EnableAsync - * @see AsyncConfigurationSelector + * @see org.springframework.scheduling.annotation.AsyncConfigurationSelector */ @Configuration public class AspectJAsyncConfiguration extends AbstractAsyncConfiguration { diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/Autowired.java b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/Autowired.java index 2c815be98869..066dd11da520 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/Autowired.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/Autowired.java @@ -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. @@ -39,7 +39,7 @@ * a special case of such a general config method. Such config methods * do not have to be public. * - *

In the case of multiple argument methods, the 'required' parameter is + *

In the case of multiple argument methods, the 'required' parameter is * applicable for all arguments. * *

In case of a {@link java.util.Collection} or {@link java.util.Map} @@ -52,8 +52,9 @@ * BeanPostProcessor} which in turn means that you cannot * use {@code @Autowired} to inject references into * {@link org.springframework.beans.factory.config.BeanPostProcessor - * BeanPostProcessor} or {@link BeanFactoryPostProcessor} types. Please - * consult the javadoc for the {@link AutowiredAnnotationBeanPostProcessor} + * BeanPostProcessor} or + * {@link org.springframework.beans.factory.config.BeanFactoryPostProcessor BeanFactoryPostProcessor} + * types. Please consult the javadoc for the {@link AutowiredAnnotationBeanPostProcessor} * class (which, by default, checks for the presence of this annotation). * * @author Juergen Hoeller diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/Value.java b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/Value.java index 2136666cfbd2..eb257fdfcb1c 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/Value.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/Value.java @@ -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. @@ -37,8 +37,9 @@ * BeanPostProcessor} which in turn means that you cannot use * {@code @Value} within * {@link org.springframework.beans.factory.config.BeanPostProcessor - * BeanPostProcessor} or {@link BeanFactoryPostProcessor} types. Please - * consult the javadoc for the {@link AutowiredAnnotationBeanPostProcessor} + * BeanPostProcessor} or + * {@link org.springframework.beans.factory.config.BeanFactoryPostProcessor BeanFactoryPostProcessor} + * types. Please consult the javadoc for the {@link AutowiredAnnotationBeanPostProcessor} * class (which, by default, checks for the presence of this annotation). * * @author Juergen Hoeller diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBean.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBean.java index 6e5d0f5780a4..7b3c5ea5df29 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBean.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBean.java @@ -171,7 +171,7 @@ public void afterPropertiesSet() throws ClassNotFoundException, NoSuchFieldExcep int lastDotIndex = this.staticField.lastIndexOf('.'); if (lastDotIndex == -1 || lastDotIndex == this.staticField.length()) { throw new IllegalArgumentException( - "staticField must be a fully qualified class plus method name: " + + "staticField must be a fully qualified class plus static field name: " + "e.g. 'example.MyExampleClass.MY_EXAMPLE_FIELD'"); } String className = this.staticField.substring(0, lastDotIndex); diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/PlaceholderConfigurerSupport.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/PlaceholderConfigurerSupport.java index ddf060283c4c..2f6bd6865a11 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/PlaceholderConfigurerSupport.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/PlaceholderConfigurerSupport.java @@ -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. @@ -36,8 +36,8 @@ * *

{@code
  *
- *    
- *    
+ *    
+ *    
  *
  *}
* @@ -76,7 +76,7 @@ *

Example XML property with default value: * *

{@code
- *  
+ *  
  *}
* * @author Chris Beams diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/xml/BeanDefinitionParserDelegate.java b/spring-beans/src/main/java/org/springframework/beans/factory/xml/BeanDefinitionParserDelegate.java index b63652e79ff0..df22acc2f49b 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/xml/BeanDefinitionParserDelegate.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/xml/BeanDefinitionParserDelegate.java @@ -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. @@ -353,7 +353,7 @@ public void initDefaults(Element root) { * parentDefaults in case the defaults are not explicitly set * locally. * @param defaults the defaults to populate - * @param defaults the parent BeanDefinitionParserDelegate (if any) defaults to fall back to + * @param parentDefaults the parent BeanDefinitionParserDelegate (if any) defaults to fall back to * @param root the root element of the current bean definition document (or nested beans element) */ protected void populateDefaults(DocumentDefaultsDefinition defaults, DocumentDefaultsDefinition parentDefaults, Element root) { diff --git a/spring-beans/src/main/java/org/springframework/beans/support/ResourceEditorRegistrar.java b/spring-beans/src/main/java/org/springframework/beans/support/ResourceEditorRegistrar.java index b1c537ed3920..bcf6c8931c91 100644 --- a/spring-beans/src/main/java/org/springframework/beans/support/ResourceEditorRegistrar.java +++ b/spring-beans/src/main/java/org/springframework/beans/support/ResourceEditorRegistrar.java @@ -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. @@ -34,7 +34,6 @@ import org.springframework.beans.propertyeditors.InputStreamEditor; import org.springframework.beans.propertyeditors.URIEditor; import org.springframework.beans.propertyeditors.URLEditor; -import org.springframework.core.env.Environment; import org.springframework.core.env.PropertyResolver; import org.springframework.core.env.StandardEnvironment; import org.springframework.core.io.ContextResource; @@ -71,7 +70,7 @@ public class ResourceEditorRegistrar implements PropertyEditorRegistrar { * @see org.springframework.core.io.support.ResourcePatternResolver * @see org.springframework.context.ApplicationContext * @deprecated as of Spring 3.1 in favor of - * {@link #ResourceEditorRegistrar(ResourceLoader, Environment)} + * {@link #ResourceEditorRegistrar(ResourceLoader, PropertyResolver)} */ @Deprecated public ResourceEditorRegistrar(ResourceLoader resourceLoader) { diff --git a/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-beans-3.2.xsd b/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-beans-3.2.xsd new file mode 100644 index 000000000000..c8dec329588d --- /dev/null +++ b/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-beans-3.2.xsd @@ -0,0 +1,1180 @@ + + + + + + + + + + + + + + + + + + element. + ]]> + + + + + + + + and other elements, typically the root element in the document. + Allows the definition of default values for all nested bean definitions. May itself + be nested for the purpose of defining a subset of beans with certain default values or + to be registered only when certain profile(s) are active. Any such nested element + must be declared as the last element in the document. + ]]> + + + + + + + + + + + + + + + element may be parsed. Multiple profiles can be + separated by any number of spaces, commas, or semi-colons (or indeed any mixture of the three). + If one or more of the specified profiles are active at time of parsing, the element + will be parsed, and all of its elements registered, <import> elements followed, + etc. If none of the specified profiles are active at time of parsing, then the entire element + and its contents will be ignored. + + Profiles are activated in one of two ways: + Programmatic: + ConfigurableEnvironment#setActiveProfiles(String...) + ConfigurableEnvironment#setDefaultProfiles(String...) + + Properties (typically through -D system properties, environment variables, or servlet context init params): + spring.profiles.active=p1,p2 + spring.profiles.default=p1,p2 + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + element (or "ref" + attribute). We recommend this in most cases as it makes documentation + more explicit. + + Note that this default mode also allows for annotation-driven autowiring, + if activated. "no" refers to externally driven autowiring only, not + affecting any autowiring demands that the bean class itself expresses. + + 2. "byName" + Autowiring by property name. If a bean of class Cat exposes a "dog" + property, Spring will try to set this to the value of the bean "dog" + in the current container. If there is no matching bean by name, nothing + special happens. + + 3. "byType" + Autowiring if there is exactly one bean of the property type in the + container. If there is more than one, a fatal error is raised, and + you cannot use byType autowiring for that bean. If there is none, + nothing special happens. + + 4. "constructor" + Analogous to "byType" for constructor arguments. If there is not exactly + one bean of the constructor argument type in the bean factory, a fatal + error is raised. + + Note that explicit dependencies, i.e. "property" and "constructor-arg" + elements, always override autowiring. + + Note: This attribute will not be inherited by child bean definitions. + Hence, it needs to be specified per concrete bean definition. + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + " element. + ]]> + + + + + ..." element. + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ". + ]]> + + + + + ..." element. + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ". + ]]> + + + + + ..." + element. + ]]> + + + + + ". + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-tool-3.2.xsd b/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-tool-3.2.xsd new file mode 100644 index 000000000000..9d84906adead --- /dev/null +++ b/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-tool-3.2.xsd @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-3.2.xsd b/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-3.2.xsd new file mode 100644 index 000000000000..f7a754aa6c24 --- /dev/null +++ b/spring-beans/src/main/resources/org/springframework/beans/factory/xml/spring-util-3.2.xsd @@ -0,0 +1,212 @@ + + + + + + + + + + + Reference a public, static field on a type and expose its value as + a bean. For example <util:constant static-field="java.lang.Integer.MAX_VALUE"/>. + + + + + + + + + + + + Reference a property on a bean (or as a nested value) and expose its values as + a bean. For example <util:property-path path="order.customer.name"/>. + + + + + + + + + + + + Builds a List instance of the specified type, populated with the specified content. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Builds a Set instance of the specified type, populated with the specified content. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Builds a Map instance of the specified type, populated with the specified content. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Loads a Properties instance from the resource location specified by the 'location' attribute. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/CronTriggerFactoryBean.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/CronTriggerFactoryBean.java index a8294f05d41e..eb2644c5f7f9 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/CronTriggerFactoryBean.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/CronTriggerFactoryBean.java @@ -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. @@ -56,9 +56,7 @@ * @since 3.1 * @see #setName * @see #setGroup - * @see #setStartTime - * @see #setJobName - * @see #setJobGroup + * @see #setStartDelay * @see #setJobDetail * @see org.springframework.scheduling.quartz.SchedulerFactoryBean#setTriggers * @see org.springframework.scheduling.quartz.SchedulerFactoryBean#setJobDetails diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SimpleTriggerFactoryBean.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SimpleTriggerFactoryBean.java index c26b0d004245..9de19249487d 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SimpleTriggerFactoryBean.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SimpleTriggerFactoryBean.java @@ -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. @@ -56,9 +56,7 @@ * @since 3.1 * @see #setName * @see #setGroup - * @see #setStartTime - * @see #setJobName - * @see #setJobGroup + * @see #setStartDelay * @see #setJobDetail * @see org.springframework.scheduling.quartz.SchedulerFactoryBean#setTriggers * @see org.springframework.scheduling.quartz.SchedulerFactoryBean#setJobDetails diff --git a/spring-context/src/main/java/org/springframework/cache/annotation/CacheAnnotationParser.java b/spring-context/src/main/java/org/springframework/cache/annotation/CacheAnnotationParser.java index f6757adb5ae7..a1d8a79c8087 100644 --- a/spring-context/src/main/java/org/springframework/cache/annotation/CacheAnnotationParser.java +++ b/spring-context/src/main/java/org/springframework/cache/annotation/CacheAnnotationParser.java @@ -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. @@ -41,7 +41,7 @@ public interface CacheAnnotationParser { * @param ae the annotated method or class * @return CacheOperation the configured caching operation, * or {@code null} if none was found - * @see AnnotationCacheOperationSource#determineCacheOperation + * @see AnnotationCacheOperationSource#determineCacheOperations(AnnotatedElement) */ Collection parseCacheAnnotations(AnnotatedElement ae); } diff --git a/spring-context/src/main/java/org/springframework/cache/annotation/CachingConfigurationSelector.java b/spring-context/src/main/java/org/springframework/cache/annotation/CachingConfigurationSelector.java index df8be605cc1f..33c4a120a766 100644 --- a/spring-context/src/main/java/org/springframework/cache/annotation/CachingConfigurationSelector.java +++ b/spring-context/src/main/java/org/springframework/cache/annotation/CachingConfigurationSelector.java @@ -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. @@ -30,7 +30,7 @@ * @since 3.1 * @see EnableCaching * @see ProxyCachingConfiguration - * @see AnnotationConfigUtils.CACHE_ASPECT_CONFIGURATION_CLASS_NAME + * @see AnnotationConfigUtils#CACHE_ASPECT_CONFIGURATION_CLASS_NAME */ public class CachingConfigurationSelector extends AdviceModeImportSelector { diff --git a/spring-context/src/main/java/org/springframework/cache/annotation/EnableCaching.java b/spring-context/src/main/java/org/springframework/cache/annotation/EnableCaching.java index a054afa6f7bb..771487a56ff8 100644 --- a/spring-context/src/main/java/org/springframework/cache/annotation/EnableCaching.java +++ b/spring-context/src/main/java/org/springframework/cache/annotation/EnableCaching.java @@ -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. @@ -163,7 +163,7 @@ /** * Indicate how caching advice should be applied. The default is - * {@link AdviceMode.PROXY}. + * {@link AdviceMode#PROXY}. * @see AdviceMode */ AdviceMode mode() default AdviceMode.PROXY; diff --git a/spring-context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCache.java b/spring-context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCache.java index 71e8561bec4e..5c78b309203b 100644 --- a/spring-context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCache.java +++ b/spring-context/src/main/java/org/springframework/cache/concurrent/ConcurrentMapCache.java @@ -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. @@ -115,7 +115,7 @@ public void clear() { /** * Convert the given value from the internal store to a user value * returned from the get method (adapting null). - * @param userValue the store value + * @param storeValue the store value * @return the value to return to the user */ protected Object fromStoreValue(Object storeValue) { diff --git a/spring-context/src/main/java/org/springframework/cache/ehcache/EhCacheCacheManager.java b/spring-context/src/main/java/org/springframework/cache/ehcache/EhCacheCacheManager.java index 2fb21c7e637e..a1588ac7dfc0 100644 --- a/spring-context/src/main/java/org/springframework/cache/ehcache/EhCacheCacheManager.java +++ b/spring-context/src/main/java/org/springframework/cache/ehcache/EhCacheCacheManager.java @@ -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. @@ -39,8 +39,8 @@ public class EhCacheCacheManager extends AbstractCacheManager { /** - * Returns the backing Ehcache {@link net.sf.ehcache.CacheManager}. - * @return + * Returns the backing EhCache {@link net.sf.ehcache.CacheManager}. + * @return the backing EhCache {@link net.sf.ehcache.CacheManager}. */ public net.sf.ehcache.CacheManager getCacheManager() { return cacheManager; diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/BeanFactoryCacheOperationSourceAdvisor.java b/spring-context/src/main/java/org/springframework/cache/interceptor/BeanFactoryCacheOperationSourceAdvisor.java index 97cb34d624b9..a8d4a51e7b7a 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/BeanFactoryCacheOperationSourceAdvisor.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/BeanFactoryCacheOperationSourceAdvisor.java @@ -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. @@ -44,7 +44,6 @@ protected CacheOperationSource getCacheOperationSource() { * Set the cache operation attribute source which is used to find cache * attributes. This should usually be identical to the source reference * set on the cache interceptor itself. - * @see CacheInterceptor#setCacheAttributeSource */ public void setCacheOperationSource(CacheOperationSource cacheOperationSource) { this.cacheOperationSource = cacheOperationSource; diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheProxyFactoryBean.java b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheProxyFactoryBean.java index d156a701cdaf..67a22e2b3535 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheProxyFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheProxyFactoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2011 the original author or authors. + * Copyright 2010-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. @@ -24,7 +24,7 @@ * Proxy factory bean for simplified declarative caching handling. * This is a convenient alternative to a standard AOP * {@link org.springframework.aop.framework.ProxyFactoryBean} - * with a separate {@link CachingInterceptor} definition. + * with a separate {@link CacheInterceptor} definition. * *

This class is designed to facilitate declarative cache demarcation: namely, wrapping * a singleton target object with a caching proxy, proxying all the interfaces that the @@ -36,7 +36,7 @@ * * @author Costin Leau * @see org.springframework.aop.framework.ProxyFactoryBean - * @see CachingInterceptor + * @see CacheInterceptor */ @SuppressWarnings("serial") public class CacheProxyFactoryBean extends AbstractSingletonProxyFactoryBean { diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/NameMatchCacheOperationSource.java b/spring-context/src/main/java/org/springframework/cache/interceptor/NameMatchCacheOperationSource.java index 55d6f2a6c37a..69f22ec49fae 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/NameMatchCacheOperationSource.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/NameMatchCacheOperationSource.java @@ -50,7 +50,6 @@ public class NameMatchCacheOperationSource implements CacheOperationSource, Seri * (e.g. "myMethod") and CacheOperation instances * (or Strings to be converted to CacheOperation instances). * @see CacheOperation - * @see CacheOperationEditor */ public void setNameMap(Map> nameMap) { for (Map.Entry> entry : nameMap.entrySet()) { diff --git a/spring-context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java b/spring-context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java index 8478cf6f2ffd..23995bcac9e4 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java @@ -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. @@ -35,6 +35,7 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; + import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; import javax.annotation.Resource; @@ -509,9 +510,12 @@ public final DependencyDescriptor getDependencyDescriptor() { */ private class ResourceElement extends LookupElement { - @SuppressWarnings("unused") protected boolean shareable = true; + private volatile boolean cached = false; + + private volatile Object cachedFieldValue; + public ResourceElement(Member member, PropertyDescriptor pd) { super(member, pd); } @@ -546,7 +550,20 @@ else if (beanFactory instanceof ConfigurableBeanFactory){ @Override protected Object getResourceToInject(Object target, String requestingBeanName) { - return getResource(this, requestingBeanName); + Object value = null; + if (this.cached && this.shareable) { + value = this.cachedFieldValue; + } + synchronized (this) { + if (!this.cached) { + value = getResource(this, requestingBeanName); + if (value != null && this.shareable) { + this.cachedFieldValue = value; + this.cached = true; + } + } + } + return value; } } @@ -724,4 +741,4 @@ public Class getDependencyType() { } } -} +} \ No newline at end of file diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ComponentScan.java b/spring-context/src/main/java/org/springframework/context/annotation/ComponentScan.java index f0826a62ebed..26a3a6cec985 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ComponentScan.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ComponentScan.java @@ -132,7 +132,7 @@ /** * Declares the type filter to be used as an {@linkplain ComponentScan#includeFilters() - * include filter} or {@linkplain ComponentScan#includeFilters() exclude filter}. + * include filter} or {@linkplain ComponentScan#excludeFilters() exclude filter}. */ @Retention(RetentionPolicy.RUNTIME) @Target({}) diff --git a/spring-context/src/main/java/org/springframework/context/annotation/Configuration.java b/spring-context/src/main/java/org/springframework/context/annotation/Configuration.java index 5d39ac635c8a..b09623c29c0f 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/Configuration.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/Configuration.java @@ -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. @@ -28,7 +28,7 @@ import org.springframework.stereotype.Component; /** - * Indicates that a class declares one or more @{@link Bean} methods and may be processed + * Indicates that a class declares one or more {@link Bean @Bean} methods and may be processed * by the Spring container to generate bean definitions and service requests for those * beans at runtime, for example: *

@@ -76,14 +76,14 @@
  * post processors that facilitate handling {@code @Configuration} classes.
  *
  * 

Via component scanning

- *

{@code @Configuration} is meta-annotated with @{@link Component}, therefore + *

{@code @Configuration} is meta-annotated with {@link Component @Component}, therefore * {@code @Configuration} classes are candidates for component scanning (typically using * Spring XML's {@code } element) and therefore may also take - * advantage of @{@link Autowired}/@{@link Inject} at the field and method level (but not - * at the constructor level). + * advantage of {@link Autowired @Autowired}/{@link javax.inject.Inject @Inject} + * at the field and method level (but not at the constructor level). *

{@code @Configuration} classes may not only be bootstrapped using * component scanning, but may also themselves configure component scanning using - * the @{@link ComponentScan} annotation: + * the {@link ComponentScan @ComponentScan} annotation: *

  * @Configuration
  * @ComponentScan("com.acme.app.services")
@@ -91,8 +91,8 @@
  *     // various @Bean definitions ...
  * }
* - * See @{@link ComponentScan} Javadoc for details. - * + * See {@link ComponentScan @ComponentScan} Javadoc for details. + * * *

Working with externalized values

*

Using the {@code Environment} API

@@ -115,7 +115,8 @@ * * Properties resolved through the {@code Environment} reside in one or more "property * source" objects, and {@code @Configuration} classes may contribute property sources to - * the {@code Environment} object using the @{@link PropertySources} annotation: + * the {@code Environment} object using + * the {@link org.springframework.core.env.PropertySources @PropertySources} annotation: *
  * @Configuration
  * @PropertySource("classpath:/com/acme/app.properties")
@@ -129,11 +130,11 @@
  * }
* * See {@link org.springframework.core.env.Environment Environment} - * and @{@link PropertySource} Javadoc for further details. - * + * and {@link PropertySource @PropertySource} Javadoc for further details. + * *

Using the {@code @Value} annotation

* Externalized values may be 'wired into' {@code @Configuration} classes using - * the @{@link Value} annotation: + * the {@link Value @Value} annotation: *
  * @Configuration
  * @PropertySource("classpath:/com/acme/app.properties")
@@ -151,13 +152,13 @@
  * PropertySourcesPlaceholderConfigurer}, usually enabled via XML with
  * {@code }.  See the section below on composing
  * {@code @Configuration} classes with Spring XML using {@code @ImportResource},
- * see @{@link Value} Javadoc, and see @{@link Bean} Javadoc for details on working with
+ * see {@link Value @Value} Javadoc, and see {@link Bean @Bean} Javadoc for details on working with
  * {@code BeanFactoryPostProcessor} types such as
  * {@code PropertySourcesPlaceholderConfigurer}.
  *
  * 

Composing {@code @Configuration} classes

*

With the {@code @Import} annotation

- *

{@code @Configuration} classes may be composed using the @{@link Import} annotation, + *

{@code @Configuration} classes may be composed using the {@link Import @Import} annotation, * not unlike the way that {@code } works in Spring XML. Because * {@code @Configuration} objects are managed as Spring beans within the container, * imported configurations may be injected using {@code @Autowired} or {@code @Inject}: @@ -189,7 +190,7 @@ * new AnnotationConfigApplicationContext(AppConfig.class);

* *

With the {@code @Profile} annotation

- * {@code @Configuration} classes may be marked with the @{@link Profile} annotation to + * {@code @Configuration} classes may be marked with the {@link Profile @Profile} annotation to * indicate they should be processed only if a given profile or profiles are * active: *
@@ -211,14 +212,14 @@
  *     }
  * }
* - * See @{@link Profile} and {@link org.springframework.core.env.Environment Environment} + * See {@link Profile @Profile} and {@link org.springframework.core.env.Environment Environment} * Javadoc for further details. * *

With Spring XML using the {@code @ImportResource} annotation

* As mentioned above, {@code @Configuration} classes may be declared as regular Spring * {@code } definitions within Spring XML files. It is also possible to * import Spring XML configuration files into {@code @Configuration} classes using - * the @{@link ImportResource} annotation. Bean definitions imported from XML can be + * the {@link ImportResource @ImportResource} annotation. Bean definitions imported from XML can be * injected using {@code @Autowired} or {@code @Import}: *
  * @Configuration
@@ -267,7 +268,7 @@
  * 

Configuring lazy initialization

*

By default, {@code @Bean} methods will be eagerly instantiated at container * bootstrap time. To avoid this, {@code @Configuration} may be used in conjunction with - * the @{@link Lazy} annotation to indicate that all {@code @Bean} methods declared within + * the {@link Lazy @Lazy} annotation to indicate that all {@code @Bean} methods declared within * the class are by default lazily initialized. Note that {@code @Lazy} may be used on * individual {@code @Bean} methods as well. * @@ -291,7 +292,7 @@ * }

* * See TestContext framework reference documentation for details. - * + * *

Enabling built-in Spring features using {@code @Enable} annotations

* Spring features such as asynchronous method execution, scheduled task execution, * annotation driven transaction management, and even Spring MVC can be enabled and @@ -309,7 +310,7 @@ *
  • @Configuration classes must be non-final *
  • @Configuration classes must be non-local (may not be declared within a method) *
  • @Configuration classes must have a default/no-arg constructor and may not - * use @{@link Autowired} constructor parameters. Any nested configuration classes + * use {@link Autowired @Autowired} constructor parameters. Any nested configuration classes * must be {@code static} * * diff --git a/spring-context/src/main/java/org/springframework/context/annotation/EnableLoadTimeWeaving.java b/spring-context/src/main/java/org/springframework/context/annotation/EnableLoadTimeWeaving.java index bed3cec76acd..3c8abd8066fd 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/EnableLoadTimeWeaving.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/EnableLoadTimeWeaving.java @@ -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. @@ -64,13 +64,13 @@ * TomcatInstrumentableClassLoader}). * *

    To customize the weaver used, the {@code @Configuration} class annotated with - * {@code @EnableLoadTimeWeaving} may also implement the {@link LoadTimeWeaverConfigurer} + * {@code @EnableLoadTimeWeaving} may also implement the {@link LoadTimeWeavingConfigurer} * interface and return a custom {@code LoadTimeWeaver} instance through the * {@code #getLoadTimeWeaver} method: *

      * @Configuration
      * @EnableLoadTimeWeaving
    - * public class AppConfig implements LoadTimeWeaverConfigurer {
    + * public class AppConfig implements LoadTimeWeavingConfigurer {
      *     @Override
      *     public LoadTimeWeaver getLoadTimeWeaver() {
      *         MyLoadTimeWeaver ltw = new MyLoadTimeWeaver();
    diff --git a/spring-context/src/main/java/org/springframework/context/annotation/FilterType.java b/spring-context/src/main/java/org/springframework/context/annotation/FilterType.java
    index 9ed1b8994348..26bd302d8e8f 100644
    --- a/spring-context/src/main/java/org/springframework/context/annotation/FilterType.java
    +++ b/spring-context/src/main/java/org/springframework/context/annotation/FilterType.java
    @@ -28,8 +28,8 @@
      * @author Chris Beams
      * @since 2.5
      * @see ComponentScan
    - * @see ComponentScan.IncludeFilter
    - * @see ComponentScan.ExcludeFilter
    + * @see ComponentScan#includeFilters()
    + * @see ComponentScan#excludeFilters()
      * @see org.springframework.core.type.filter.TypeFilter
      */
     public enum FilterType {
    diff --git a/spring-context/src/main/java/org/springframework/context/annotation/Import.java b/spring-context/src/main/java/org/springframework/context/annotation/Import.java
    index 4a2fe947ca87..6aacf68a4403 100644
    --- a/spring-context/src/main/java/org/springframework/context/annotation/Import.java
    +++ b/spring-context/src/main/java/org/springframework/context/annotation/Import.java
    @@ -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.
    @@ -23,23 +23,23 @@
     import java.lang.annotation.Target;
     
     /**
    - * Indicates one or more @{@link Configuration} classes to import.
    + * Indicates one or more {@link Configuration @Configuration} classes to import.
      *
      * 

    Provides functionality equivalent to the {@code } element in Spring XML. * Only supported for classes annotated with {@code @Configuration} or declaring at least - * one {@link @Bean} method, as well as {@link ImportSelector} and + * one {@link Bean @Bean} method, as well as {@link ImportSelector} and * {@link ImportBeanDefinitionRegistrar} implementations. * - *

    @{@code Bean} definitions declared in imported {@code @Configuration} classes - * should be accessed by using @{@link Autowired} injection. Either the bean itself can - * be autowired, or the configuration class instance declaring the bean can be autowired. - * The latter approach allows for explicit, IDE-friendly navigation between - * {@code @Configuration} class methods. + *

    {@code @Bean} definitions declared in imported {@code @Configuration} classes + * should be accessed by using {@link org.springframework.beans.factory.annotation.Autowired @Autowired} + * injection. Either the bean itself can be autowired, or the configuration class instance + * declaring the bean can be autowired. The latter approach allows for explicit, + * IDE-friendly navigation between {@code @Configuration} class methods. * *

    May be declared at the class level or as a meta-annotation. * *

    If XML or other non-{@code @Configuration} bean definition resources need to be - * imported, use @{@link ImportResource} + * imported, use {@link ImportResource @ImportResource} * * @author Chris Beams * @since 3.0 diff --git a/spring-context/src/main/java/org/springframework/context/annotation/LoadTimeWeavingConfigurer.java b/spring-context/src/main/java/org/springframework/context/annotation/LoadTimeWeavingConfigurer.java index 63322f629665..8df85b91f095 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/LoadTimeWeavingConfigurer.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/LoadTimeWeavingConfigurer.java @@ -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. @@ -19,12 +19,14 @@ import org.springframework.instrument.classloading.LoadTimeWeaver; /** - * Interface to be implemented by @{@link org.springframework.context.annotation.Configuration - * Configuration} classes annotated with @{@link EnableLoadTimeWeaving} that wish to + * Interface to be implemented by + * {@link org.springframework.context.annotation.Configuration @Configuration} + * classes annotated with {@link EnableLoadTimeWeaving @EnableLoadTimeWeaving} that wish to * customize the {@link LoadTimeWeaver} instance to be used. * - *

    See @{@link EnableAsync} for usage examples and information on how a default - * {@code LoadTimeWeaver} is selected when this interface is not used. + *

    See {@link org.springframework.scheduling.annotation.EnableAsync @EnableAsync} + * for usage examples and information on how a default {@code LoadTimeWeaver} + * is selected when this interface is not used. * * @author Chris Beams * @since 3.1 diff --git a/spring-context/src/main/java/org/springframework/context/support/AbstractApplicationContext.java b/spring-context/src/main/java/org/springframework/context/support/AbstractApplicationContext.java index 84831884b7be..23b157f1d8ab 100644 --- a/spring-context/src/main/java/org/springframework/context/support/AbstractApplicationContext.java +++ b/spring-context/src/main/java/org/springframework/context/support/AbstractApplicationContext.java @@ -506,7 +506,7 @@ protected void prepareRefresh() { /** *

    Replace any stub property sources with actual instances. * @see org.springframework.core.env.PropertySource.StubPropertySource - * @see org.springframework.web.context.support.WebApplicationContextUtils#initSerlvetPropertySources + * @see org.springframework.web.context.support.WebApplicationContextUtils#initServletPropertySources */ protected void initPropertySources() { // For subclasses: do nothing by default. diff --git a/spring-context/src/main/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.java b/spring-context/src/main/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.java index aa8d9e799249..c831bbb85514 100644 --- a/spring-context/src/main/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.java +++ b/spring-context/src/main/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.java @@ -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. @@ -108,7 +108,7 @@ public void setEnvironment(Environment environment) { *

    Processing occurs by replacing ${...} placeholders in bean definitions by resolving each * against this configurer's set of {@link PropertySources}, which includes: *