Commit Graph

1172 Commits

Author SHA1 Message Date
Juergen Hoeller 9bf4d7cf4e Polishing 2016-11-22 14:57:00 +01:00
Juergen Hoeller 85b0ce1ef7 Avoid defensive checks against java.time API
Issue: SPR-13188
2016-11-22 14:55:03 +01:00
Juergen Hoeller da63898d5f Polishing 2016-11-21 17:36:04 +01:00
Juergen Hoeller dc8cd4e4c0 Polishing
Issue: SPR-14888
2016-11-08 17:26:59 +01:00
Kazuki Shimizu 124f2128fa Detect invalid configuration for autoGrowCollectionLimit on DataBinder
Issue: SPR-14888
2016-11-09 01:00:27 +09:00
Juergen Hoeller b3cd1ad7f1 Refined throwing of BeanCreationExceptions (and reflection exceptions)
Issue: SPR-14883
2016-11-07 19:03:18 +01:00
Rossen Stoyanchev 816e32872a Reactive support for @ModelAttribute argument
Issue: SPR-14542
2016-11-07 15:02:13 +02:00
Rossen Stoyanchev 3230ca6d39 Add ConcurrentModel
This commit adds a Model implementation based on ConcurrentHashMap for
use in Spring Web Reactive.

Issue: SPR-14542
2016-11-07 15:02:13 +02:00
Juergen Hoeller 7f4904ed22 Avoid deprecated Mockito methods
Issue: SPR-14880
2016-11-04 20:39:53 +01:00
Juergen Hoeller 8df45dd274 @Async docs explicitly mention ListenableFuture and CompletableFuture
Issue: SPR-14881
2016-11-04 12:54:24 +01:00
Juergen Hoeller ac774cdcef Avoid deprecated Mockito methods
Issue: SPR-14880
2016-11-04 12:24:46 +01:00
Juergen Hoeller 8ae0bd6ea9 ApplicationListenerDetector ignores non-managed bean instances
Issue: SPR-14879
2016-11-03 22:52:43 +01:00
Juergen Hoeller 8053fefea8 Consistent support for early placeholder resolution in properties locations
Issue: SPR-10502
2016-11-03 14:33:48 +01:00
Juergen Hoeller 03468fd9ed ReloadableResourceBundleMessageSource sets file timestamp on merged holder
Issue: SPR-14583
2016-11-03 14:27:44 +01:00
Juergen Hoeller b07d40cc44 Polishing
(cherry picked from commit 77e00f1)
2016-10-31 20:56:00 +01:00
Juergen Hoeller ac80ac6f8b Consistent instanceof/casting of Class references 2016-10-30 21:40:27 +01:00
Juergen Hoeller 2f9ed5917b Polishing 2016-10-28 23:49:21 +02:00
Juergen Hoeller dc080cb1be Revised NoSuchBeanDefinitionException message and ResolvableType handling
Includes consistent quoting of qualified type names in related classes.

Issue: SPR-14831
2016-10-28 23:39:05 +02:00
Juergen Hoeller c946924431 ApplicationListener detection for inner beans behind post-processors
Issue: SPR-14783
2016-10-28 23:35:56 +02:00
Juergen Hoeller bf9083d60f TypeDescriptor supports merged annotation lookups (for composable formatting annotations)
Issue: SPR-14844
2016-10-28 23:33:26 +02:00
Juergen Hoeller 08972eff9b Local merged annotation lookup in SpringCacheAnnotationParser
Issue: SPR-14781
Issue: SPR-14801
2016-10-28 23:32:55 +02:00
Juergen Hoeller 13001b9aff SimpleApplicationEventMulticaster just swallows event downcast exceptions
Issue: SPR-14846
2016-10-28 15:25:22 +02:00
Stephane Nicoll 56c48623fd Allow @Cacheable method to return Optional
This commit further refines 240f254 to also support java.util.Optional
for synchronized cache access (i.e. when the `sync` attribute on
`@Cacheable` is set to `true`).

Issue: SPR-14853
2016-10-27 09:47:15 +02:00
Stephane Nicoll ffa728c23c Move NoOpCache to a top-level public class
This commit moves `NoOpCache` to a top-level public class to allow reuse
in custom CacheManager arrangement.

Issue: SPR-14856
2016-10-27 09:06:32 +02:00
Stephane Nicoll 1f3b8ff2f7 LiveBeansView does not rely on application contexts order anymore
This commit makes sure that the `unregister` order of registered
application contexts has no incidence on the removal of the LiveBeansView
MBean.

Rather than using the last application context's name to compute the
identity of the MBean to remove, the identity is stored when the MBean is
created.

This commit also adds missing tests.

Issue: SPR-14848
2016-10-26 15:03:14 +02:00
Stephane Nicoll 19db0424d2 Clarify SpEL usage on `@EventListener`
Issue: SPR-14812
2016-10-25 17:45:12 +02:00
Juergen Hoeller 3726c6f18d Polishing 2016-10-21 12:26:27 +02:00
Juergen Hoeller f7d740fa69 ConversionService detects generic type declaration on target class behind proxy as well
Issue: SPR-14822
2016-10-21 12:24:12 +02:00
Stephane Nicoll fc8bad36c9 Fix formatting
Closes gh-1206
2016-10-15 11:55:07 +03:00
Philippe Marschall ae5b0c6fb5 Replace J2EE with Java EE
String with version 5 the name of Java Platform, Enterprise Edition
changed from J2EE to Java EE. However a lot of the documentation still
uses the term J2EE.

This commit includes the following changes:

 * replace J2EE with Java EE where appropriate

This is not a blind search and replace. The following occurrences
remain unchanged:

 * references to old J2EE releases, most notably 1.3 and 1.4.
 * references to "Expert One-On-One J2EE Design and Development"
 * references to "Core J2EE patterns"
 * XML namespaces
 * package names

Issue: SPR-14811
See gh-1206
2016-10-15 11:49:00 +03:00
Juergen Hoeller eafaaa5cb8 Polishing 2016-10-12 17:11:04 +02:00
Juergen Hoeller a32b52555a @Primary not marked as inherited anymore
Issue: SPR-14780
2016-10-12 17:10:29 +02:00
Juergen Hoeller 74b6a5b6d7 BindingResult does not hold on to ConversionService when serialized in session
Issue: SPR-8282
2016-10-12 17:08:55 +02:00
Stephane Nicoll ab232a5386 Polish EnableAsync javadoc
Issue: SPR-14793
2016-10-11 08:21:52 +02:00
Juergen Hoeller ebed7b77c3 SpringValidatorAdapter declares ResolvableAttribute as serializable
Issue: SPR-14778
2016-10-05 21:54:56 +02:00
Juergen Hoeller fb7ae010c8 Avoid unnecessary generics on emptyMap/Set/List 2016-09-26 18:04:49 +02:00
Juergen Hoeller bf6653b837 Adapted to 4.3.3 backport
Issue: SPR-14728
2016-09-18 21:33:58 +02:00
Sam Brannen 8f62b63663 Introduce 'value' alias for @Bean's 'name' attribute
In order to simplify configuration for use cases involving @Bean where
only a bean name or aliases are supplied as an attribute, this commit
introduces a new 'value' attribute that is an @AliasFor 'name' in @Bean.

Issue: SPR-14728
2016-09-17 16:16:06 +02:00
Juergen Hoeller ce42ed4d44 Polishing 2016-09-13 21:58:41 +02:00
Juergen Hoeller c69e6a36f7 Revised IllegalArgumentException handling for Formatter parse calls
Issue: SPR-14661
2016-09-13 21:55:20 +02:00
Juergen Hoeller 0c2e8a6246 Consistent callbacks for TypeFilters, ImportSelectors and ImportBeanDefinitionRegistrars
Issue: SPR-14686
2016-09-13 21:49:24 +02:00
Juergen Hoeller 5405c07d26 Configuration class processing uses MetadataReaderFactory for current ResourceLoader
Issue: SPR-14684
2016-09-13 21:47:32 +02:00
Juergen Hoeller 480cd2c2f0 IdentityHashMap for scheduled tasks (avoiding hashCode calls on bean instances)
Issue: SPR-14666
2016-09-13 21:44:29 +02:00
Juergen Hoeller a86f6d3676 ApplicationEventPublisher as functional interface
Issue: SPR-14699
2016-09-13 21:42:23 +02:00
Juergen Hoeller 118d093eaf Drop defensive Joda-Time 2.x check 2016-09-13 21:37:44 +02:00
Juergen Hoeller d5c9cc62f1 Correct ISO DateTime example
Issue: SPR-14675
2016-09-13 21:36:41 +02:00
Stephane Nicoll dcade06fa0 Support for candidate components index
This commit adds a "spring-context-indexer" module that can be added to
any project in order to generate an index of candidate components defined
in the project.

`CandidateComponentsIndexer` is a standard annotation processor that
looks for source files with target annotations (typically `@Component`)
and references them in a `META-INF/spring.components` generated file.

Each entry in the index is the fully qualified name of a candidate
component and the comma-separated list of stereotypes that apply to that
candidate. A typical example of a stereotype is `@Component`. If a
project has a `com.example.FooService` annotated with `@Component` the
following `META-INF/spring.components` file is generated at compile time:

```
com.example.FooService=org.springframework.stereotype.Component
```

A new `@Indexed` annotation can be added on any annotation to instructs
the scanner to include a source file that contains that annotation. For
instance, `@Component` is meta-annotated with `@Indexed` now and adding
`@Indexed` to more annotation types will transparently improve the index
with additional information. This also works for interaces or parent
classes: adding `@Indexed` on a `Repository` base interface means that
the indexed can be queried for its implementation by using the fully
qualified name of the `Repository` interface.

The indexer also adds any class or interface that has a type-level
annotation from the `javax` package. This includes obviously JPA
(`@Entity` and related) but also CDI (`@Named`, `@ManagedBean`) and
servlet annotations (i.e. `@WebFilter`). These are meant to handle
cases where a component needs to identify candidates and use classpath
scanning currently.

If a `package-info.java` file exists, the package is registered using
a "package-info" stereotype.

Such files can later be reused by the `ApplicationContext` to avoid
using component scan. A global `CandidateComponentsIndex` can be easily
loaded from the current classpath using `CandidateComponentsIndexLoader`.

The core framework uses such infrastructure in two areas: to retrieve
the candidate `@Component`s and to build a default `PersistenceUnitInfo`.
Rather than scanning the classpath and using ASM to identify candidates,
the index is used if present.

As long as the include filters refer to an annotation that is directly
annotated with `@Indexed` or an assignable type that is directly
annotated with `@Indexed`, the index can be used since a dedicated entry
wil be present for that type. If any other unsupported include filter is
specified, we fallback on classpath scanning.

In case the index is incomplete or cannot be used, The
`spring.index.ignore` system property can be set to `true` or,
alternatively, in a "spring.properties" at the root of the classpath.

Issue: SPR-11890
2016-09-01 15:30:47 +02:00
Juergen Hoeller 4ef428de28 Polishing 2016-08-30 23:57:11 +02:00
Juergen Hoeller 58fa63fdd1 ApplicationListenerMethodAdapter resolves order on construction
Issue: SPR-14642
2016-08-30 20:50:02 +02:00
Sam Brannen d6d05e8ca0 Remove trailing whitespace in Java source code 2016-08-29 15:25:10 +02:00