Commit Graph

1147 Commits

Author SHA1 Message Date
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
Juergen Hoeller 57cb7c7e0a LiveBeansView exposes aliases as well
Issue: SPR-14632
2016-08-26 20:04:23 +02:00
Juergen Hoeller 405e74b6ae GenericApplicationContext picks up ClassLoader from custom ResourceLoader
Issue: SPR-14626
2016-08-24 21:23:57 +02:00
Juergen Hoeller ab0d523cc0 Polishing
(cherry picked from commit 1932a9d)
2016-08-17 21:54:40 +02:00
Juergen Hoeller 6a0d9d3d97 Consistent support for CompilationCustomizers as well as custom CompilerConfiguration
Issue: SPR-14585
2016-08-17 11:29:49 +02:00
Juergen Hoeller a1b167a988 Polishing 2016-08-17 00:53:38 +02:00
Juergen Hoeller 433764d217 GroovyScriptFactory supports CompilationCustomizer next to GroovyObjectCustomizer
Issue: SPR-14585
2016-08-17 00:47:50 +02:00
Juergen Hoeller 214c919742 AspectJ bean pointcut supports qualifier match
Issue: SPR-11217
2016-08-17 00:43:41 +02:00
Stephane Nicoll 0d59a15849 Better document #result semantic
Commit 240f254 has introduced support for `java.util.Optional` in the
cache abstraction. If such type is present, the contained value is cached
if it is present.

This new feature slightly changed the semantic of `#result` that was
documented up till this commit as the "return value of the method
invocation". This is no longer true as `#result` for `Optional<T>`
refers to the `T` instance and not the `Optional` instance.

This commit clarifies both the javadoc and the documentation.

Issue: SPR-14587
2016-08-16 13:45:10 +02:00
Igor Mukhin 3f0b458616 Add aditional example to CronSequenceGenerator
CronSequenceGenerator supports comma separated expressions but does not
provide an example for it. This commit adds such an example.

Closes gh-1132
2016-08-16 11:41:37 +02:00
Juergen Hoeller 59a24b406a Polishing 2016-08-10 14:20:42 +02:00
Juergen Hoeller fae503d568 MethodBasedEvaluationContext reliably exposes varargs
Issue: SPR-14554
2016-08-09 21:24:38 +02:00
Stephane Nicoll 8aadb8d193 Polish Javadoc
Issue: SPR-14552
2016-08-06 17:15:36 +02:00
Juergen Hoeller d96a66ae8f ConfigurationClassParser uses unified ImportStack with chained import analysis
Issue: SPR-14517
2016-07-28 00:06:13 +02:00
Juergen Hoeller 328e04f167 JndiPropertySource defensively skips invalid JNDI lookup for property name with colon in resource-ref mode
Issue: SPR-14518
2016-07-27 22:37:25 +02:00
Juergen Hoeller 5db449556b Polishing 2016-07-27 16:21:55 +02:00
Juergen Hoeller 316244d2bd Isolated circular import detection for scanned configuration classes
Issue: SPR-14517
2016-07-27 16:21:48 +02:00
Juergen Hoeller b9ab895743 Inferred generics for newSetFromMap arrangements
Issue: SPR-13188
2016-07-26 21:26:31 +02:00
Juergen Hoeller e03dea1d64 Polishing 2016-07-26 17:15:19 +02:00
Juergen Hoeller 75fc0f8538 Framework build compatible with JDK 9 (even with -target 1.9)
Issue: SPR-13344
2016-07-25 23:26:09 +02:00
Juergen Hoeller 9f2cb3e276 Keep deprecated addCache method (e.g. for Spring Data Redis)
Issue: SPR-14430
2016-07-25 17:47:11 +02:00
Juergen Hoeller 4a85309a04 Consistent throwing of BeanNotOfRequiredTypeException even for existing proxy
Issue: SPR-14504
2016-07-24 15:31:00 +02:00
Juergen Hoeller 0e3f0bd9d0 Avoid JDK proxy against CGLIB Factory interface and assert required type when resolving dependency
Issue: SPR-14478
2016-07-20 18:05:51 +02:00
Juergen Hoeller a4743c07d4 Polishing 2016-07-19 20:09:00 +02:00
Juergen Hoeller 88fcd0a2ed Framework build compatible with JDK 9 (tests running against java.base module)
Issue: SPR-13344
2016-07-19 19:37:34 +02:00
Juergen Hoeller d07381e862 Avoid deprecated number constructors on JDK 9
Issue: SPR-13344
2016-07-19 19:25:55 +02:00