Commit Graph

1020 Commits

Author SHA1 Message Date
Sam Brannen c866c172ec Polish spring-context-4.2.xsd 2015-09-22 01:13:36 -04:00
Juergen Hoeller fbce18418a Context namespace exposes null-value attribute for property-placeholder element
Issue: SPR-13461
2015-09-21 20:47:03 +02:00
Kamil Szymanski 6802504db0 Fix `@Configuration` javadoc typo
Closes gh-874
2015-09-18 06:39:57 -04:00
Juergen Hoeller 4dee9cbf62 ConcurrentMapCache.putIfAbsent properly supports nulls
Issue: SPR-13458
2015-09-10 14:02:18 +02:00
Sam Brannen 22e84a87f4 Polish proxy tests 2015-09-08 18:34:47 +02:00
Juergen Hoeller a8432bc8a1 Tests for enum array with varargs (and related refinements)
Issue: SPR-13328
2015-09-08 11:13:23 +02:00
Juergen Hoeller 811de8e50b AbstractApplicationContext allows for re-refresh and re-close
Issue: SPR-13425
2015-09-04 14:38:23 +02:00
Sam Brannen 93f3b9cbe0 Polish Javadoc for @EnableAsync 2015-09-02 19:08:56 +02:00
Juergen Hoeller 7118fcff0d MethodValidationInterceptor falls back to invocation attempt with resolved bridge method (for Hibernate Validator 5.2 compatibility)
Issue: SPR-12237
2015-08-27 19:13:29 +02:00
Juergen Hoeller e05fb494f5 Polishing 2015-08-26 11:04:14 +02:00
Juergen Hoeller 3430f7623c Consistent detection of meta-annotation attributes via ASM
Issue: SPR-13394
2015-08-25 21:52:11 +02:00
Juergen Hoeller c685fd7c23 Polishing 2015-08-21 17:03:53 +02:00
Juergen Hoeller 6d1b8b5a31 SpringWebConstraintValidatorFactory for use with validation.xml
Issue: SPR-13327
2015-08-21 17:02:55 +02:00
Stephane Nicoll 22948bd7f0 Add hook to create custom BeanPropertyBindingResult
Issue: SPR-13373
2015-08-20 19:50:37 +02:00
Sam Brannen f47bbb0d9e Polish tests 2015-08-12 19:35:45 +02:00
Juergen Hoeller e0f012f32d Removal of redundant JdkVersion checks in the test suite
Issue: SPR-13312
2015-08-12 18:42:36 +02:00
Juergen Hoeller d8794a1edc Test against EhCache 3.0 M2 (as a JCache provider)
Includes latest dependency updates (Jackson 2.6.1, Jetty 9.3.2, Undertow 1.2.10)

Issue: SPR-13342
2015-08-12 16:16:25 +02:00
Juergen Hoeller 9ef38807e6 Polishing 2015-07-30 19:34:33 +02:00
Juergen Hoeller 2c2bed2adb ResourceBundleMessageSource checks containsKey before calling getString
Issue: SPR-13295
2015-07-30 19:34:12 +02:00
Sam Brannen 725292081e Introduce 'value' alias for 'attribute' in @AliasFor
SPR-11512 introduced support for annotation attribute aliases via
@AliasFor, requiring the explicit declaration of the 'attribute'
attribute. However, for aliases within an annotation, this explicit
declaration is unnecessary.

This commit improves the readability of alias pairs declared within an
annotation by introducing a 'value' attribute in @AliasFor that is an
alias for the existing 'attribute' attribute. This allows annotations
such as @ContextConfiguration from the spring-test module to declare
aliases as follows.

public @interface ContextConfiguration {

     @AliasFor("locations")
     String[] value() default {};

     @AliasFor("value")
     String[] locations() default {};

    // ...
}

Issue: SPR-13289
2015-07-29 15:27:06 +02:00
Juergen Hoeller b74377932c Deprecate native JRuby support
Issue: SPR-13283
2015-07-28 16:00:09 +02:00
Juergen Hoeller d83735694e Polishing 2015-07-28 12:15:48 +02:00
Juergen Hoeller f0ac2784a4 Removed unused fields from ConfigurationClassBeanDefinitionReader
Issue: SPR-11740
Issue: SPR-13280
2015-07-28 12:08:54 +02:00
Sam Brannen aae0bd2fb4 Update TODO for SPR-13280 2015-07-25 21:53:09 +02:00
Juergen Hoeller efd7f9bf72 Polishing 2015-07-24 18:24:19 +02:00
Juergen Hoeller edd6e76b9f Polishing 2015-07-21 22:58:34 +02:00
Juergen Hoeller 1a636b1023 Polishing 2015-07-21 20:33:13 +02:00
Sam Brannen 0153913ef4 Polish and simplify EnableSchedulingTests 2015-07-20 14:55:48 +02:00
Juergen Hoeller cad0665187 Fixed exception message expectation plus formatting
Issue: SPR-13236
2015-07-20 13:01:14 +02:00
Juergen Hoeller c3e57dd245 AsyncAnnotationBeanPostProcessor tries to find TaskExecutor by type/name
Issue: SPR-13248
2015-07-17 18:55:46 +02:00
Juergen Hoeller 8e55ad1c08 Polishing 2015-07-17 16:33:15 +02:00
Juergen Hoeller 66d8c2819f ScheduledAnnotationBeanPostProcessor falls back to "taskScheduler" bean by name
Issue: SPR-13236
2015-07-17 16:29:48 +02:00
Juergen Hoeller 9f15f347bf Renamed 'name' attribute to 'scopeName' (in order to avoid common override conflicts)
Issue: SPR-13239
2015-07-17 15:23:47 +02:00
Juergen Hoeller ef781b6353 Fixed default formatters test to reliably work with any system locale
Issue: SPR-13232
2015-07-15 02:18:04 +02:00
Juergen Hoeller 2934256257 Polishing 2015-07-15 00:08:11 +02:00
Juergen Hoeller 09eb492079 Merged bean definitions are now cached early and selectively evicted after post-processing and before actual bean creation
Issue: SPR-12236
2015-07-15 00:05:39 +02:00
Juergen Hoeller f4f508d869 Revisit date-time tests for compatibility with JDK 9 build 72
Issue: SPR-13232
2015-07-14 23:58:30 +02:00
Juergen Hoeller c7fef87e76 ResourceBundleThemeSource exposes fallbackToSystemLocale and defaultEncoding
Issue: SPR-13209
2015-07-13 14:59:35 +02:00
Sam Brannen 2e41c2e23d Polish Javadoc in @EventListener 2015-07-08 18:40:08 +02:00
Sam Brannen 72f0ac7e5b Polish Javadoc in @EventListener 2015-07-08 18:33:35 +02:00
Stephane Nicoll fd2c0cc982 Polish 2015-07-08 18:09:16 +02:00
Sam Brannen 14e168f2dc Fix typos in @EventListener 2015-07-08 15:19:47 +02:00
Sam Brannen f300325b1b Polishing 2015-07-08 15:08:29 +02:00
Stephane Nicoll e3bb06c878 Avoid Java8 API 2015-07-08 14:58:52 +02:00
Stephane Nicoll bf786c3176 Support for multiple events per method
In addition to specifying the event type to listen to via a method
parameter, any @EventListener annotated method can now alternatively
define the event type(s) to listen to via the "classes" attributes (that
is aliased to "value").

Something like

@EventListener({FooEvent.class, BarEvent.class})
public void handleFooBar() { .... }

Issue: SPR-13156
2015-07-08 14:51:07 +02:00
Juergen Hoeller 08fb62570e Explicit notes for load-time weaving on Tomcat 7.0.63+ and WildFly 9
Issue: SPR-13210
2015-07-07 22:01:36 +02:00
Sam Brannen 50bed38a85 Polishing 2015-07-07 21:23:02 +02:00
Juergen Hoeller f58e1db2e6 Explicit notes for @Bean on static methods, private methods, and Java 8 default methods
Also includes an explicit note on stop vs destroy callbacks for Lifecycle beans.

Issue: SPR-13118
Issue: SPR-12882
Issue: SPR-12345
Issue: SPR-11671
2015-07-07 16:49:26 +02:00
Juergen Hoeller ca3ba7deb5 Extended/BindingAwareModelMap are not meant to be referred to in user code
Issue: SPR-12896
2015-07-07 16:44:46 +02:00
Sam Brannen 27d1ce84a3 Polishing 2015-06-20 01:45:46 +02:00
Sam Brannen fb83e83e78 Honor contract of @Repeatable in AnnotationUtils
Prior to this commit, the implementation of getRepeatableAnnotation()
in Spring's AnnotationUtils complied neither with the contract of
getAnnotationsByType() nor with the contract of
getDeclaredAnnotationsByType() as defined in AnnotatedElement in Java 8.

Specifically, unexpected results can be encountered when using Spring's
support for @Repeatable annotations: either annotations show up in the
returned set in the wrong order, or annotations are returned in the set
that should not even be found based on the semantics of @Repeatable.

This commit remedies this problem by deprecating the existing
getRepeatableAnnotation() methods and replacing them with new
getRepeatableAnnotations() and getDeclaredRepeatableAnnotations()
methods that comply with the contracts of Java's getAnnotationsByType()
and getDeclaredAnnotationsByType(), respectively.

Issue: SPR-13068
2015-06-20 01:21:39 +02:00
Sam Brannen 6c530b7bfb Delete trailing whitespace in XML files 2015-06-19 17:14:10 +02:00
Juergen Hoeller f1c7dc4f4b Introduced SimpleTransactionScope (analogous to SimpleThreadScope)
Issue: SPR-13085
2015-06-18 00:29:46 +02:00
Juergen Hoeller d7f8fa50be Polishing 2015-06-16 22:01:58 +02:00
Juergen Hoeller 92f1754b1e Fixed fallback mode in ObjenesisCglibAopProxy, plus consistent support for bypassing Objenesis (e.g. on Google App Engine)
This 4.2 commit revises SpringObjenesis towards a smart delegate, including support for a "spring.objenesis.ignore" system property.

Issue: SPR-13131
2015-06-16 22:01:37 +02:00
Stephane Nicoll 75c88ffbeb Remove deprecated warnings 2015-06-16 15:23:56 +02:00
Juergen Hoeller c41779f895 AsyncExecutionInterceptor supports Java 8's CompletableFuture as a return type
Issue: SPR-13128
2015-06-15 20:35:48 +02:00
Juergen Hoeller 06a5ed9cae AbstractApplicationContext resets common introspection caches after refresh
Issue: SPR-13093
2015-06-15 20:34:46 +02:00
Juergen Hoeller 10cb80a500 Removed superfluous @Ignore import
Issue: SPR-11807
2015-06-15 15:57:10 +02:00
Juergen Hoeller 1c01f575c2 ConfigurationClassParser ignores unresolvable member classes
Issue: SPR-13115
2015-06-15 15:46:14 +02:00
Stephane Nicoll 95acf8c989 Remove references to codehaus.org
Issue: SPR-13129
2015-06-15 15:44:29 +02:00
Sam Brannen 32c17bf540 Revise method and parameter names in annotation support
In AnnotatedElementUtils, all methods pertaining to merging annotation
attributes have been renamed to "getMerged*()" and "findMerged*()"
accordingly. Existing methods such as getAnnotationAttributes(..) have
been deprecated in favor of the more descriptive "merged" variants.
This aligns the naming conventions in AnnotatedElementUtils with those
already present in AnnotationReadingVisitorUtils.

The use of "annotationType" as a variable name for the fully qualified
class name of an annotation type has been replaced with
"annotationName" in order to improve the readability and intent of the
code base.

In MetaAnnotationUtils.AnnotationDescriptor, getMergedAnnotation() has
been renamed to synthesizeAnnotation(), and the method is now
overridden in UntypedAnnotationDescriptor to always throw an
UnsupportedOperationException in order to avoid potential run-time
ClassCastExceptions.

Issue: SPR-11511
2015-06-14 00:34:40 +02:00
Sam Brannen 60cdfa535e Polish ComponentScanParserScopedProxyTests 2015-06-13 16:09:03 +02:00
Sam Brannen 2d23f42609 Introduce alias for 'value' attribute in @Scope
Issue: SPR-11393
2015-06-13 16:07:29 +02:00
Juergen Hoeller 75edb3979e AspectJExpressionPointcut defensively catches exceptions thrown from ShadowMatch.matchesJoinPoint
Issue: SPR-13102
2015-06-11 14:44:19 +02:00
Juergen Hoeller e97506be55 Member classes get exposed to the import stack now
Issue: SPR-13101
2015-06-11 09:56:03 +02:00
Juergen Hoeller b02352d30f Enabled test for AspectJ pointcut matching against lambda-defined bean
Issue: SPR-11807
2015-06-10 15:03:06 +02:00
Stephane Nicoll b87816ed20 Add ResolvableTypeProvider
Provide a mean to detect the actual ResolvableType based on a instance as
a counter measure to type erasure.

Upgrade the event infrastructure to detect if the event (or the payload)
implements such interface. When this is the case, the return value of
`getResolvableType` is used to validate its generic type against the
method signature of the listener.

Issue: SPR-13069
2015-06-09 10:57:31 +02:00
Stephane Nicoll e8441edcb7 Remove commons pool 2.x workaround
While working on SPR-12532, an extra IdentityWrapper was added to work
around a backward compatible issue between commons pool 1.x and 2.x. This
issue (POOL-283) has actually been fixed in 2.4 and their IdentityWrapper
is using object equality so our wrapper is in the way.

Looking retrospectively, the code looks all fine without the workaround
and commons pool 2.4 or later so it has been removed.
2015-06-05 16:41:21 +02:00
Juergen Hoeller 869b0bc7ee Create enhanced FactoryBean instance before applying method interceptor (preferably via Objenesis)
Also removes "throws Exception" declaration from ThreadPoolExecutorFactoryBean's getObject method.

Issue: SPR-13095
2015-06-05 00:09:42 +02:00
Juergen Hoeller d195ad216a Polishing 2015-06-04 23:27:40 +02:00
Juergen Hoeller 9410dff99c AsyncResult allows for exposing an execution exception
Issue: SPR-13076
2015-06-04 23:25:18 +02:00
Sam Brannen 0db948e72d Polish Javadoc for @Scope 2015-06-04 15:42:15 -04:00
Sam Brannen ff8597fa80 Introduce alias for 'value' attribute in @ComponentScan.Filter
Issue: SPR-11393
2015-06-04 15:25:20 -04:00
Sam Brannen 39e820b4bf Polish Javadoc for @ComponentScan 2015-06-04 15:20:37 -04:00
Sam Brannen d4ee75ddf0 Log correct class name for introspection failure
Issue: SPR-13091
2015-06-03 21:31:12 -04:00
Sam Brannen d3b5aeb768 Introduce alias for 'value' attribute in @ImportResource
Issue: SPR-11393
2015-06-03 21:26:43 -04:00
Sam Brannen e5dc6e964c Introduce getAliasedStringArray() in AnnotationAttributes
Issue: SPR-11393
2015-06-03 21:26:43 -04:00
Stephane Nicoll 08c032d9fd Allow Cache annotations to not specify any cache name
Since Spring 4.1, a CacheResolver may be configured to customize the way
the cache(s) to use for a given cache operation are retrieved. Since a
CacheResolver implementation may not use the cache names information at
all, this attribute has been made optional.

However, a fix was still applied, preventing a Cache operation without a
cache name to be defined properly. We now allow this valid use case.

Issue: SPR-13081
2015-06-03 11:42:49 +02:00
Juergen Hoeller 4f1286a4c3 Lite configuration candidate check defensively handles method introspection failure
Issue: SPR-13091
2015-06-02 14:18:00 +02:00
Juergen Hoeller 11401bd5e4 Upgrade to Hibernate ORM 5.0 RC1 and Hibernate Validator 5.2 RC1
Includes other recent dependency updates (JRuby 1.7.20, Jetty 9.2.11, Tomcat 8.0.23, Reactor 2.0.3)

Issue: SPR-13088
2015-06-01 18:35:57 +02:00
Sam Brannen 81844191f8 Polish Javadoc for @ImportResource 2015-05-31 23:06:15 +02:00
Sam Brannen 4dffeeee64 Introduce alias for 'value' attribute in caching annotations
This commit introduces new 'cacheNames' attributes (analogous to the
existing attribute of the same name in @CacheConfig) as aliases for the
'value' attributes in @Cacheable, @CachePut, and @CacheEvict.

In addition, SpringCacheAnnotationParser.getAnnotations() has been
refactored to support synthesized annotations.

Issue: SPR-11393
2015-05-31 22:52:01 +02:00
Sam Brannen de06f422f3 Polish Javadoc for caching annotations 2015-05-31 22:51:53 +02:00
Sam Brannen 845f4f2bb7 Improve attribute alias support in @ComponentScan
Prior to this commit, @ComponentScan already had a value/basePackages
alias pair; however, the semantics were not properly enforced.

This commit addresses this issue by refactoring
ComponentScanAnnotationParser to ensure that it is not possible to
declare both of the aliased attributes. In addition, the 'value' and
'basePackages' attributes are now annotated with @AliasFor in order to
make the semantics clearer.

Issue: SPR-11393
2015-05-31 15:39:15 +02:00
Sam Brannen 94aa90646b Polish Javadoc for @ComponentScan 2015-05-31 15:32:56 +02:00
Sam Brannen e30c9b2ef3 Synthesize annotation from a map of attributes
Spring Framework 4.2 RC1 introduced support for synthesizing an
annotation from an existing annotation in order to provide additional
functionality above and beyond that provided by Java. Specifically,
such synthesized annotations provide support for @AliasFor semantics.
As luck would have it, the same principle can be used to synthesize an
annotation from any map of attributes, and in particular, from an
instance of AnnotationAttributes.

The following highlight the major changes in this commit toward
achieving this goal.

- Introduced AnnotationAttributeExtractor abstraction and refactored
  SynthesizedAnnotationInvocationHandler to delegate to an
  AnnotationAttributeExtractor.

- Extracted code from SynthesizedAnnotationInvocationHandler into new
  AbstractAliasAwareAnnotationAttributeExtractor and
  DefaultAnnotationAttributeExtractor implementation classes.

- Introduced MapAnnotationAttributeExtractor for synthesizing an
  annotation that is backed by a map or AnnotationAttributes instance.

- Introduced a variant of synthesizeAnnotation() in AnnotationUtils
  that accepts a map.

- Introduced findAnnotation(*) methods in AnnotatedElementUtils that
  synthesize merged AnnotationAttributes back into an annotation of the
  target type.

The following classes have been refactored to use the new support for
synthesizing AnnotationAttributes back into an annotation.

- ApplicationListenerMethodAdapter
- TestAnnotationUtils
- AbstractTestContextBootstrapper
- ActiveProfilesUtils
- ContextLoaderUtils
- DefaultActiveProfilesResolver
- DirtiesContextTestExecutionListener
- TestPropertySourceAttributes
- TestPropertySourceUtils
- TransactionalTestExecutionListener
- MetaAnnotationUtils
- MvcUriComponentsBuilder
- RequestMappingHandlerMapping

In addition, this commit also includes changes to ensure that arrays
returned by synthesized annotations are properly cloned first.

Issue: SPR-13067
2015-05-29 01:38:51 +02:00
Juergen Hoeller c622f4c487 Polishing 2015-05-23 22:24:10 +02:00
Sam Brannen ca66e076d1 Support annotation attribute aliases and overrides via @AliasFor
This commit introduces first-class support for aliases for annotation
attributes. Specifically, this commit introduces a new @AliasFor
annotation that can be used to declare a pair of aliased attributes
within a single annotation or an alias from an attribute in a custom
composed annotation to an attribute in a meta-annotation.

To support @AliasFor within annotation instances, AnnotationUtils has
been overhauled to "synthesize" any annotations returned by "get" and
"find" searches. A SynthesizedAnnotation is an annotation that is
wrapped in a JDK dynamic proxy which provides run-time support for
@AliasFor semantics. SynthesizedAnnotationInvocationHandler is the
actual handler behind the proxy.

In addition, the contract for @AliasFor is fully validated, and an
AnnotationConfigurationException is thrown in case invalid
configuration is detected.

For example, @ContextConfiguration from the spring-test module is now
declared as follows:

    public @interface ContextConfiguration {

        @AliasFor(attribute = "locations")
        String[] value() default {};

        @AliasFor(attribute = "value")
        String[] locations() default {};

        // ...
    }

The following annotations and their related support classes have been
modified to use @AliasFor.

- @ManagedResource
- @ContextConfiguration
- @ActiveProfiles
- @TestExecutionListeners
- @TestPropertySource
- @Sql
- @ControllerAdvice
- @RequestMapping

Similarly, support for AnnotationAttributes has been reworked to
support @AliasFor as well. This allows for fine-grained control over
exactly which attributes are overridden within an annotation hierarchy.
In fact, it is now possible to declare an alias for the 'value'
attribute of a meta-annotation.

For example, given the revised declaration of @ContextConfiguration
above, one can now develop a composed annotation with a custom
attribute override as follows.

    @ContextConfiguration
    public @interface MyTestConfig {

        @AliasFor(
           annotation = ContextConfiguration.class,
           attribute = "locations"
        )
        String[] xmlFiles();

        // ...
    }

Consequently, the following are functionally equivalent.

- @MyTestConfig(xmlFiles = "test.xml")
- @ContextConfiguration("test.xml")
- @ContextConfiguration(locations = "test.xml").

Issue: SPR-11512, SPR-11513
2015-05-22 00:01:07 +02:00
Elizabeth Chatman 5652f02af0 Fix number parsing of @Scheduled attributes
See gh-801
2015-05-20 20:41:29 +02:00
Stephane Nicoll 0ed9ca097b Customize destruction callback for AutoCloseable beans
Previously, a Bean implementing `AutoCloseable` (or `Closeable`) was
always destroyed regardless of its bean definition. In particular, the
documented way of disabling the destruction callback via an empty String
did not work.

AutoCloseable beans are now treated pretty much as any other bean: we
still use the presence of the interface to optimize the check of a
destroy method and we only auto-discover the method name to invoke if
the inferred mode is enabled.

Issue: SPR-13022
2015-05-20 17:19:42 +02:00
Juergen Hoeller 271804f105 Polishing 2015-05-20 15:35:11 +02:00
Juergen Hoeller de893ada2b Compatibility with JSR-354 final (and its new Monetary singleton)
Includes support for currency detection with @NumberFormat.

Issue: SPR-12209
2015-05-20 15:15:29 +02:00
Juergen Hoeller b4095c3e1d Class identity comparisons wherever possible
Issue: SPR-12926
2015-05-20 14:34:16 +02:00
Stephane Nicoll cf391f5ce1 polish
Remove unused imports
2015-05-19 08:49:01 +02:00
Juergen Hoeller 6418b54f81 DataBinder tries ConversionService if PropertyEditor could not produce required type
Issue: SPR-13042
2015-05-18 23:53:39 +02:00
Sam Brannen 03ade48d68 Expound on inheritance semantics for @Conditional
Issue: SPR-11598
2015-05-13 16:06:36 +02:00
Juergen Hoeller ef7cf2c650 Revised description of event source parameter
Issue: SPR-13021
2015-05-13 14:58:02 +02:00
Juergen Hoeller 02da2e85ee DataBinder allows for adding custom Formatters as alternative to PropertyEditors (including per-field formatters)
Includes a generic FormatterPropertyEditorAdapter plus Number conversion support in TypeConverterDelegate.

Issue: SPR-7773
Issue: SPR-6069
2015-05-12 22:33:18 +02:00
Juergen Hoeller 64a01d64c5 Polishing 2015-05-11 14:42:45 +02:00
Philippe Marschall 994d86992c Avoid eager formatting in pre-condition checks
In general, the Spring Framework aims to construct error message
strings only if an actual error has occurred. This seems to be the
common pattern in the codebase and saves both CPU and memory. However,
there are some places where eager error message formatting occurs
unnecessarily.

This commit addresses this issue in the following classes:
AdviceModeImportSelector, AnnotationAttributes, and
ReadOnlySystemAttributesMap.

The change in ReadOnlySystemAttributesMap also avoids a potential
NullPointerException.

Issue: SPR-13007
2015-05-10 12:36:01 +02:00
Juergen Hoeller 1722fa6678 JSR-223 based StandardScriptFactory (including <lang:std> support)
This commit also completes 4.2 schema variants in spring-context.

Issue: SPR-5215
2015-05-08 23:56:08 +02:00
Sam Brannen 4bf32578b5 Rename MethodBasedEvaluationContextTest to *Tests 2015-05-08 18:44:49 +02:00
Juergen Hoeller dbd82d128d Polishing 2015-05-07 20:18:17 +02:00
Juergen Hoeller e87dc9f82d Test for AspectJ pointcuts with lambdas (currently marked as ignored)
Issue: SPR-11807
2015-05-07 19:59:54 +02:00
Juergen Hoeller 1cc042d4c7 Polishing 2015-05-07 16:03:15 +02:00
Sam Brannen 7a690df925 Remove trailing whitespace from Java source code 2015-05-06 20:08:42 +02:00
Sam Brannen 2015781ea1 Rename duplicate EnvironmentIntegrationTests to EnvironmentSystemIntegrationTests 2015-05-06 15:55:20 +02:00
Stephane Nicoll b8f10f69a9 Fix binary compatibility for SmartApplicationListener
Making sure that `GenericApplicationListenerAdapter` implements
`SmartApplicationListener` again as older code may try to cast an
instance to `SmartApplicationListener`.

Issue: SPR-8201
2015-05-06 08:52:47 +09:00
Sam Brannen 572cbb0821 Consistently supply test name to @Parameters 2015-05-05 14:07:00 +02:00
Juergen Hoeller 706d3adf07 Consistently throw IllegalStateException from getAutowireCapableBeanFactory()
Issue: SPR-12932
2015-04-24 23:20:43 +02:00
Sam Brannen 122d3476d9 Polish Javadoc for condition annotation attributes 2015-04-24 01:38:13 +02:00
Sam Brannen ad6bea1cda Support abstract, bridge, & interface methods in AnnotatedElementUtils
This commit introduces support for finding annotations on abstract,
bridge, and interface methods in AnnotatedElementUtils.

 - Introduced dedicated findAnnotationAttributes() methods in
   AnnotatedElementUtils that provide first-class support for
   processing methods, class hierarchies, interfaces, bridge methods,
   etc.

 - Introduced find/get search algorithm dichotomy in
   AnnotatedElementUtils which is visible in the public API as well as
   in the internal implementation. This was necessary in order to
   maintain backwards compatibility with the existing API (even though
   it was undocumented).

 - Reverted all recent changes made to the "get semantics" search
   algorithm in AnnotatedElementUtils in order to ensure backwards
   compatibility, and reverted recent changes to
   JtaTransactionAnnotationParser and SpringTransactionAnnotationParser
   accordingly.

 - Documented internal AnnotatedElementUtils.Processor<T> interface.

 - Enabled failing tests and introduced
   findAnnotationAttributesFromBridgeMethod() test in
   AnnotatedElementUtilsTests.

 - Refactored ApplicationListenerMethodAdapter.getCondition() and
   enabled failing test in TransactionalEventListenerTests.

 - AnnotationUtils.isInterfaceWithAnnotatedMethods() is now package
   private.

Issue: SPR-12738, SPR-11514, SPR-11598
2015-04-24 00:55:48 +02:00
Sam Brannen e0d2dbd21d Polish Javadoc & TODOs in ApplicationListenerMethodAdapter
Issue: SPR-12738
2015-04-23 01:33:47 +02:00
Sam Brannen 86733a98da Polish ApplicationListenerMethodAdapter 2015-04-22 02:54:23 +02:00
Juergen Hoeller 9ed0a56d84 AbstractApplicationContext collects early ApplicationEvents and publishes them once the multicaster is available
Issue: SPR-12902
2015-04-16 18:16:15 +02:00
Juergen Hoeller aa49949d7a Bean type mismatch check accepts assignable values according to ClassUtils
Issue: SPR-12905
2015-04-16 18:15:33 +02:00
Juergen Hoeller e403aefe86 Proper exception in case of an @Bean method call encountering a bean type mismatch
Issue: SPR-12905
2015-04-15 23:37:51 +02:00
Juergen Hoeller 1da98b0542 @Bean-returned FactoryBean proxy delegates to actual target instance now
Issue: SPR-12915
2015-04-15 22:49:53 +02:00
Sam Brannen 96e6406b4b Clarify semantics for multiple profiles in @Profile 2015-04-15 21:56:31 +02:00
Juergen Hoeller fafb823e8d Polishing 2015-04-15 15:13:42 +02:00
Stephane Nicoll e5b505224b Improve exception message
Issue: SPR-12898
2015-04-10 09:20:51 +02:00
Stephane Nicoll 6bc14cc7ae Add cache-related logs
Add a trace log for cache hit and cache miss events.

Issue: SPR-11654
2015-04-07 14:27:43 +02:00
Juergen Hoeller 595cdf05e9 Polishing 2015-04-04 00:23:25 +02:00
Juergen Hoeller e1395a6c68 Avoid repeated exposure of SpringProxy/Advised for fallback interfaces as well
Issue: SPR-12870
2015-04-01 18:54:47 +02:00
Juergen Hoeller 2c637dcb2e ReaderEditor supports Reader injection analogous to InputStreamEditor (from Spring resource location)
Also, EncodedResource implements InputStreamSource now since it declares getInputStream() anyway.

Issue: SPR-12876
2015-04-01 17:02:55 +02:00
Juergen Hoeller ceb17fcaca CronSequenceGenerator explicitly rejects invalid incrementer delta
Issue: SPR-12871
2015-04-01 16:45:24 +02:00
Juergen Hoeller f9c2d1d171 DefaultAopProxyFactory falls back to JdkDynamicAopProxy when encountering JDK proxy as target
Issue: SPR-12870
2015-03-31 16:15:22 +02:00
Juergen Hoeller a15dc08bea @Import allows for importing regular component classes as well
Issue: SPR-11740
2015-03-31 11:39:20 +02:00
Juergen Hoeller 14c891c3b3 MethodValidationPostProcessor provides protected createMethodValidationAdvice template method
Issue: SPR-12863
2015-03-31 10:12:35 +02:00
Juergen Hoeller 7e22623758 Clarification: Lifecycle does not imply auto-startup semantics
Issue: SPR-12855
2015-03-30 21:06:12 +02:00
Juergen Hoeller beae336627 Polishing 2015-03-25 15:22:41 +01:00
Stephane Nicoll 314b069fd8 Only require an exception CacheResolver if necessary
Previously, a cache infrastructure with only a CacheResolver would have
worked fine until the JSR-107 API is added to the classpath. When this is
the case, the JCache support kicks in and an exception cache resolver is
all of the sudden required.

The CacheResolver _is_ different as the default implementation does look
different attributes so if a custom CacheResolver is set, it is not
possible to "reuse" it as a fallback exception CacheResolver.

Now, an exception CacheResolver is only required if a JSR-107 annotation
with an "exceptionCacheName" attribute is processed (i.e. the exception
CacheResolver is lazily instantiated if necessary).

The use case of having a CachingConfigurerSupport with only a
CacheResolver was still broken though since the JCache support only looks
for a JCacheConfigurer bean (per the generic type set on
AbstractCachingConfiguration). This has been fixed as well.

Issue: SPR-12850
2015-03-25 15:12:08 +01:00
Juergen Hoeller d23893fd25 Consistent javadoc param declarations for type variables 2015-03-25 00:44:01 +01:00
Juergen Hoeller b2308926bc Restored isTypeMatch null behavior and refined typeToMatch parameter name
Issue: SPR-12147
2015-03-23 21:57:03 +01:00
Juergen Hoeller 1a8c6fa5ee Deferred import processing reliably detects late registration attempts
Issue: SPR-12838
2015-03-23 19:58:02 +01:00
Juergen Hoeller 192462902e Consistent support for Java 8 default methods (in interfaces implemented by user classes)
Covers ReflectionUtils.doWithMethods as well as affected annotation post-processors.
Includes an extension of MethodMetadata for the detection of @Bean default methods.

Issue: SPR-12822
Issue: SPR-10919
2015-03-19 16:50:15 +01:00
Juergen Hoeller 778a01943b ResolvableType-based type matching at the BeanFactory API level
Issue: SPR-12147
2015-03-18 23:05:13 +01:00
Juergen Hoeller a3e5fbf5ed Revised DefaultManagedAwareThreadFactory to make its non-JNDI fallback work
Issue: SPR-12830
2015-03-18 21:21:46 +01:00
Juergen Hoeller c43acd7675 SpringValidatorAdapter allows for fine-tuning the FieldError representation
Issue: SPR-12819
2015-03-16 21:01:18 +01:00
Juergen Hoeller 768f6e836a Bean class name may contain SpEL expression for late resolution
Issue: SPR-12817
2015-03-16 20:53:41 +01:00
Juergen Hoeller 6c169bd644 Initial support for JSR-354 Money & Currency
Issue: SPR-12209
2015-03-13 19:40:00 +01:00
Juergen Hoeller 13659d645b Consistent support for @Order annotation as alternative to Ordered interface
Issue: SPR-12806
2015-03-13 18:18:33 +01:00
Juergen Hoeller f5b4e18209 @Configuration classes get processed according to their @Order (if applicable)
Issue: SPR-12657
2015-03-13 18:18:21 +01:00
Juergen Hoeller 9d497cbd98 @Bean definitions override scanned classes, plus check whether overriding is actually allowed
Issue: SPR-9567
Issue: SPR-9682
2015-03-13 18:18:06 +01:00
Stephane Nicoll 8f8a85912a Call AsyncUncaughtExceptionHandler when necessary
If a sub-class of Future (such as ListenableFuture) is used as a return
type and an exception is thrown, the AsyncUncaughtExceptionHandler is
called. Now checking for any Future implementation instead of a faulty
strict matching.

Issue: SPR-12797
2015-03-09 09:57:53 +01:00
Sam Brannen d90cee78ef Remove trailing whitespace in source code 2015-03-07 21:16:18 +01:00
Kazuki Shimizu c746b10da9 Support @NumberFormat as a meta-annotation
This commit ensures that @NumberFormat can be used as a
meta-annotation, as was already the case for @DateTimeFormat.

In addition, this commit polishes FormattingConversionServiceTests and
MvcNamespaceTests.

Issue: SPR-12743
2015-03-07 21:00:25 +01:00
Sam Brannen 789d904658 Assume TestGroup.PERFORMANCE for AnnotationProcessorPerformanceTests
This commit applies the TestGroup.PERFORMANCE assumption for all test
methods within AnnotationProcessorPerformanceTests.
2015-03-07 15:43:09 +01:00
Juergen Hoeller 71cdf856e1 (Reloadable)ResourceBundleMessageSource allows for custom PropertyResourceBundle/Properties subclasses
Issue: SPR-12666
2015-03-06 17:45:37 +01:00
Juergen Hoeller b541fc9366 Polishing 2015-03-05 18:56:57 +01:00
Stephane Nicoll 772a26a743 polishing
Issue: SPR-12761
2015-03-05 15:36:08 +01:00
Stephane Nicoll 31df7155ab Refine BeanPostProcessorChecker condition
Previously, adding `@EnableAsync` on a blank application would lead to an
info message stating that `ProxyAsyncConfiguration` is not eligible for
getting processed by all BeanPostProcessors. Concretely, this is ok as
such internal configuration is not meant to be a target of such post
processing.

Revisit the condition for non infrastructure bean only. Add the
infrastructure role to a set of internal configuration, including the
`ProxyAsyncConfiguration`.

Issue: SPR-12761
2015-03-05 11:37:11 +01:00
Juergen Hoeller fdd1f83639 Polishing
(cherry picked from commit 3783591)
2015-03-02 22:05:16 +01:00
Juergen Hoeller ab2c721875 LoadTimeWeavingConfiguration should not rely on private field injection
Issue: SPR-12776
(cherry picked from commit 1259671)
2015-03-02 21:58:01 +01:00
Sam Brannen 7edc7c2c8f Fully support XML config in GroovyBeanDefinitionReader
Prior to this commit, the GroovyBeanDefinitionReader claimed (via its
Javadoc) that it fully supported XML configuration files in addition to
its Groovy DSL; however, this was unfortunately inaccurate since XML
validation was disabled by default which led to certain features of XML
configuration not working. For example, it was impossible to define a
<qualifier> in an XML config file without specifying the 'type'
attribute (which has a default value defined in the spring-beans XSD).

This commit fixes this issue by ensuring that bean definitions in XML
resources are loaded with a "standard" XmlBeanDefinitionReader that is
created with default settings (i.e., with XML validation enabled). With
regard to backwards compatibility, bean definitions defined using the
Groovy DSL are still loaded with an XmlBeanDefinitionReader that has
XML validation disabled by default which is necessary for proper
parsing of the Groovy DSL.

Issue: SPR-12769
2015-02-28 23:12:13 +01:00
Stephane Nicoll babbf6e871 Harmonize resources location
Issue: SPR-12766
2015-02-28 10:32:40 +01:00
Juergen Hoeller 2b3409461f Polishing 2015-02-27 22:29:42 +01:00
Sam Brannen fcd60b269e Polish ScheduledTaskRegistrar(Tests) 2015-02-27 19:26:17 +01:00
Juergen Hoeller 81102deedf Avoid potential deadlocks between event multicaster and singleton registry through shared lock
Issue: SPR-12739
2015-02-26 18:35:06 +01:00
Juergen Hoeller 09fde31732 Support for Hibernate Validator 5.2
Issue: SPR-12758
2015-02-26 18:33:53 +01:00
Juergen Hoeller 626748d718 Renamed ScheduledTaskRegistrarTest to ScheduledTaskRegistrarTests
Issue: SPR-12748
2015-02-26 18:33:37 +01:00
Tobias Montagna-Hay 64467b4f59 Provide accessors to scheduled tasks
Updated ScheduledTaskRegistrar to offer accessors to the tasks
it is responsible to schedule.

Issue: SPR-12748
2015-02-26 14:05:45 +01:00
Stephane Nicoll dff2a3d180 Reduce logging level of EventListenerMethodProcessor
Reduce logging level when no target annotation is found a on bean. For
consistency, update ScheduledAnnotationBeanPostProcessor and
JmsListenerAnnotationBeanPostProcessor that define the same log
statement.

Issue: SPR-12574
2015-02-26 13:33:19 +01:00
Juergen Hoeller bb5b5d52ed Revised condition override check based on method names instead of bean names
Issue: SPR-12744
2015-02-25 18:45:28 +01:00
Sam Brannen c3408d869c @NumberFormat & @DateTimeFormat are now @Documented 2015-02-23 23:34:55 +02:00
Juergen Hoeller e3d1a1dda2 @Resource injection points support @Lazy as well
Issue: SPR-12654
2015-02-20 21:53:34 +01:00
Stephane Nicoll 152a7b645f Support for Collection-based return type
If an `@EventListener` annotated method returns a Collection or an Array,
each individual items are now published as an event instead of publishing
one event with said collection.

Issue: SPR-12733
2015-02-20 09:40:16 +01:00
Stephane Nicoll 8fcbdaee24 Handle receive timeout in JmsInvokerClientInterceptor
JmsInvokerClientInterceptor defines a receiveTimeout field but does not
handle such timeout. This commit adds an additional callback that throws
an RemoteTimeoutException instead.

Sub-classes can override the onReceiveTimeout to throw a different
exception or return a fallback RemoteInvocationResult.

Issue: SPR-12731
2015-02-19 17:13:48 +01:00
Stephane Nicoll aabf73dea4 Add Commons Pool 2 support
Deprecated CommonsPoolTargetSource (supporting commons pool 1.5+) in
favor of CommonsPool2TargetSource with a similar contract.

Commons Pool 2.x uses object equality while Commons Pool 1.x used
identity equality. This clearly means that Commons Pool 2 behaves
differently if several instances having the same identity according to
their `Object#equals(Object)` method are managed in the same pool. To
provide a smooth upgrade, a backward-compatible pool is created by
default; use `setUseObjectEquality(boolean)` if you need the standard
Commons Pool 2.x behavior.

Issue: SPR-12532
2015-02-19 13:07:04 +01:00
Stephane Nicoll 1aec6a6cc2 Detect Order on target class as well
Previously, the `@Order` annotation was managed in an inconsistent way
when placed at the implementation level. For simple beans, it was
discovered properly but wasn't for beans requiring a proxy.

OrderComparator.SourceProvider now explicitly allows to return several
order sources; the default implementation returns not only the factory
method (if  any) but also the target class if it happens to be different
from the class of the bean.

Issue: SPR-12636
2015-02-19 09:47:20 +01:00
Juergen Hoeller 1273c90a64 ScheduledAnnotationBeanPostProcessor uses target class as cache key in case of proxy
Issue: SPR-12709
2015-02-18 16:16:05 +01:00
Stephane Nicoll 8eb7beebc8 Order ApplicationListener using @Order
AnnotationListener implementations can now be ordered either using the
`@Order` annotation or by implementing the Ordered interface.

Issue: SPR-12410
2015-02-16 10:41:26 +01:00
Stephane Nicoll 66735d01cf Add exception-handler attribute support for AspectJ
Previously, the exception-handler attribute was not taken care of when
task:annotation-driven is used in AspectJ mode. This commit provides the
expected behavior.

Issue: SPR-12619
2015-02-12 15:25:51 +01:00
Juergen Hoeller 058714b03a Polishing 2015-02-10 19:30:59 +01:00
Juergen Hoeller 981aefc2c0 Properly honor conditions on overriding bean methods
Issue: SPR-12694
2015-02-10 19:26:19 +01:00
Stephane Nicoll 6b3092c236 Clear expression caches on context shutdown
Issue: SPR-12691
2015-02-10 14:47:15 +01:00
Stephane Nicoll 37c04bd9c8 Fix usage of Java8 API 2015-02-10 09:47:34 +01:00
Stephane Nicoll 4741a12fdc Support for transactional event listener
Update the application event listener infrastructure to support events
that are processed according to a transactional phase.

Introduce EventListenerFactory that can be implemented to provide support
for additional event listener types. TransactionalEventListener is a new
annotation that can be used in lieu of the regular EventListener. Its
related factory implementation is registered in the context automatically
via @EnableTransactionManagement or <tx:annotation-driven/>

By default, a TransactionalEventListener is invoked when the transaction
has completed successfully (i.e. AFTER_COMMIT). Additional phases are
provided to handle BEFORE_COMMIT and AFTER_ROLLBACK events.

If no transaction is running, such listener is not invoked at all unless
the `fallbackExecution` flag has been explicitly set.

Issue: SPR-12080
2015-02-10 09:14:33 +01:00
Stephane Nicoll f0fca890bb Annotation-based event listeners
Add support for annotation-based event listeners. Enabled automatically
when using Java configuration or can be enabled explicitly via the
regular <context:annotation-driven/> XML element. Detect methods of
managed beans annotated with @EventListener, either directly or through
a meta-annotation.

Annotated methods must define the event type they listen to as a single
parameter argument. Events are automatically filtered out according to
the method signature. When additional runtime filtering is required, one
can specify the `condition` attribute of the annotation that defines a
SpEL expression that should match to actually invoke the method for a
particular event. The root context exposes the actual `event`
(`#root.event`) and method arguments (`#root.args`). Individual method
arguments are also exposed via either the `a` or `p` alias (`#a0` refers
to the first method argument). Finally, methods arguments are exposed via
their names if that information can be discovered.

Events can be either an ApplicationEvent or any arbitrary payload. Such
payload is wrapped automatically in a PayloadApplicationEvent and managed
explicitly internally. As a result, users can now publish and listen
for arbitrary objects.

If an annotated method has a return value, an non null result is actually
published as a new event, something like:

@EventListener
public FooEvent handle(BarEvent event) { ... }

Events can be handled in an aynchronous manner by adding `@Async` to the
event method declaration and enabling such infrastructure. Events can
also be ordered by adding an `@Order` annotation to the event method.

Issue: SPR-11622
2015-02-10 09:13:02 +01:00
Stephane Nicoll 6d6422acde Support for generics-based events
Update the event publishing infrastructure to support generics-based
events, that is support ApplicationListener implementations that define
a generic event, something like:

public class MyListener
        implements ApplicationListener<GenericEvent<String>> { ... }

This listener should only receive events that are matching the generic
signature, for instance:

public class StringEvent extends GenericEvent<String> { ... }

Note that because of type erasure, publishing an event that defines the
generic type at the instance level will not work. In other words,
publishing "new GenericEvent<String>" will not work as expected as type
erasure will define it as GenericEvent<?>.

To support this feature, use the new GenericApplicationListener that
supersedes SmartApplicationListener to handle generics-based even types via
`supportsEventType` that takes a ResolvableType instance instead of the
simple Class of the event. ApplicationEventMulticaster has an additional
method to multicast an event based on the event and its ResolvableType.

Issue: SPR-8201
2015-02-10 09:08:12 +01:00
Stephane Nicoll 982f9ce6c9 Allow MBeans to be excluded additively
Previously, one could only set the list of bean names to exclude from
auto-detection and there was no way to add additional bean names.

MBeanExporter now exposes a addExcludedBean method that can be invoked
during the initialization phase to add bean names to ignore.

Issue: SPR-12686
2015-02-09 09:41:03 +01:00
Stephane Nicoll c7b324b89b Move cached expression evaluation abstraction
Move MethodCacheKey and related classes to the expression package so that
other parts of the framework can benefit ot it.

CacheExpressionEvaluator is a base class that can be used to cache SpEL
expressions based on its annotation source (i.e. method). Sub-classing
that base class provides a simple to use API to retrieve Expression
instances efficiently.

Issue: SPR-12622
2015-01-26 14:44:14 +01:00
Juergen Hoeller 0479ca68fe ScheduledAnnotationBeanPostProcessor registers tasks in ContextRefreshedEvent phase (again)
Issue: SPR-12641
2015-01-22 18:42:30 +01:00
Sam Brannen 7a6dfe3765 Make MBeanServer integration tests more robust
This commit overhauls several of the tests that interact with an
MBeanServer with the goal of increasing the reliability of these tests.

 - MBeanClientInterceptorTests now uses JUnit "assumptions" instead of
   preemptively returning from test methods, thus allowing such methods
   to be properly marked as "ignored" instead of "passed".

 - MBeanClientInterceptorTests now uses JUnit's support for expected
   exceptions where appropriate.

 - MBeanClientInterceptorTests and RemoteMBeanClientInterceptorTests now
   use Spring's SocketUtils to find an available TCP port when starting
   an MBeanServer instead of aborting the tests when the default JMX
   port is not available.

Issue: SPR-12601
2015-01-12 12:19:11 +01:00
Sam Brannen 08f3a79821 Fix broken test in EnableSchedulingTests
Commit 65d163e changed the textual message of an exception thrown by
ScheduledAnnotationBeanPostProcessor.afterSingletonsInstantiated(), and
this in turn caused the withAmbiguousTaskSchedulers_andSingleTask()
method in EnableSchedulingTests to start failing (albeit only during
'Performance' builds).

This commit updates the assertion to match the current implementation of
ScheduledAnnotationBeanPostProcessor.
2015-01-10 22:30:06 +01:00
Juergen Hoeller 9ac02b319d Remove pre-3.2 deprecated classes and methods
Issue: SPR-12578
2014-12-30 20:05:15 +01:00
Juergen Hoeller 1cefeb2af0 Prevent NPE in AbstractApplicationEventMulticaster's non-caching code path
Issue: SPR-12545
2014-12-30 10:01:58 +01:00
Juergen Hoeller bc075c713f Polishing 2014-12-29 20:34:18 +01:00
Juergen Hoeller 6f2de283c4 Doc: base-packages can be comma/semicolon/space/tab/linefeed-separated
Issue: SPR-12523
2014-12-29 13:39:48 +01:00
Juergen Hoeller 0919a15f91 Spring's JMX support can rely on native MXBean detection on Java 6+
Issue: SPR-12574
2014-12-29 13:26:32 +01:00
Juergen Hoeller d4a5059097 AnnotationJmxAttributeSource uses AnnotationUtils for consistent meta-annotation handling and diagnostics
Issue: SPR-12572
2014-12-29 13:17:49 +01:00
Stephane Nicoll cae217de94 Handle scoped proxy properly in MBeanExporter
Previously, if a bean has a scoped proxy and is annotated to be exposed
to the JMX domain, both the scoped proxy and the target instance were
exposed in the JMX domain, resulting in a duplicate entries. Worse, if
such bean defines an explicit name, the application wouldn't start
because of a name conflict.

This commit deals explicitely with scoped proxy and make sure to only
expose the relevant bean.

Issue: SPR-12529
2014-12-23 16:03:52 +01:00
Juergen Hoeller 809ee0d350 Annotation post-processors clear old InjectionMetadata registrations on refresh
Issue: SPR-12526
2014-12-23 14:02:00 +01:00
Juergen Hoeller ad71c6a91c AbstractApplicationEventMulticaster populates ListenerRetriever cache in fully synchronized fashion
Issue: SPR-12545
(cherry picked from commit 61a6bc0)
2014-12-22 18:46:22 +01:00
Juergen Hoeller b30843aee0 AbstractFallbackTransactionAttributeSource's DefaultCacheKey takes targetClass into account (again)
Issue: SPR-12536
(cherry picked from commit c087e51)
2014-12-22 18:46:07 +01:00
Stephane Nicoll 67f184293b Improve performance of generateKey
Only compute the error message to display when the generated key is
actually null instead of using Assert.notNull as the cache operation
'toString()' method is non trivial and gets computed regardless of the
result.

Issue: SPR-12527
2014-12-10 14:34:11 +01:00
Juergen Hoeller bb1d1e916e Polishing 2014-12-07 20:52:18 +01:00
Juergen Hoeller 03d4e1bc22 Consistent bridge method handling in annotation post-processors
Issue: SPR-12490
Issue: SPR-12495
2014-12-07 20:51:35 +01:00
Stephane Nicoll c1f1cac359 Remove DisposableBeanMethodInterceptor
Previously, any @Configuration class was enhanced to namely implement
DisposableBean in order to remove static callbacks that were registered
for that class. This leads to problem if an ApplicationContext is created
and destroyed within the lifecycle on another ApplicationContext in the
same class loader.

It turns out that the destruction callback is no longer necessary as the
interceptors are now stateless: the VM is free to reclaim any of those if
necessary.

Issue: SPR-12445
2014-12-02 13:56:50 +01:00