Commit Graph

304 Commits

Author SHA1 Message Date
Juergen Hoeller 1420b970a7 Introduced DefaultParameterNameDiscoverer which checks JDK 8's standard reflection first and then falls back to ASM-based debug symbol analysis
Also, StandardReflectionParameterNameDiscoverer calls "Parameter.isNamePresent()" now to return null (and pass on to the next discoverer) if no JDK 8 parameters are available. Note that this requires OpenJDK 8 b100 or higher to compile now.

Issue: SPR-10532
2013-08-08 15:52:43 +02:00
Juergen Hoeller f9325a8376 Added Java 8 compliant @Schedules container annotation for @Scheduled
Issue: SPR-10532
2013-08-08 15:52:41 +02:00
Juergen Hoeller ce06d1391f Polishing
Issue: SPR-10807
2013-08-06 02:05:49 +02:00
Juergen Hoeller 9645799264 Fixed accidental use of JDK 8 getOrDefault method on MultiValueMap
Issue: SPR-10807
2013-08-06 01:45:08 +02:00
Juergen Hoeller f88f5ed011 Optimized TomcatInstrumentableClassLoader implementation
Issue: SPR-10788
(cherry picked from commit d32a77a)
2013-08-01 17:27:06 +02:00
Juergen Hoeller 127b91fd4f PropertySourcesPlaceholderConfigurer's "ignoreUnresolvablePlaceholders" setting reliably applies to nested placeholders as well
Issue: SPR-10549
2013-07-31 17:50:44 +02:00
Juergen Hoeller 481aeeec98 Polishing
Issue: SPR-10609
2013-07-30 22:36:42 +02:00
Juergen Hoeller 01a71ef5ef Polishing 2013-07-24 13:40:15 +02:00
Juergen Hoeller b8f7a30790 OpenJDK 8 build 99: different toString() output from JSR-310 Instant 2013-07-24 13:37:52 +02:00
Juergen Hoeller 2d1b44202b OpenJDK 8 build 99: annotation discovery on bridge methods 2013-07-24 13:36:59 +02:00
Phillip Webb 1a8f0d6a9e Resolve ${} placeholders in @ImportResource
Update ConfigurationClassParser to resolve any ${} placeholders from
@ImportResource values.

Issue: SPR-10686
2013-07-19 13:10:16 -07:00
Rossen Stoyanchev d3cecfc6cc Create spring-messaging module
Consolidates new, messaging-related classes from spring-context and
spring-websocket into one module.
2013-07-12 13:44:41 -04:00
Rossen Stoyanchev 2803845151 Update MessageConverter and reactor dependencies 2013-07-10 16:00:40 -04:00
Rossen Stoyanchev 0c92b85c3d Rename ChannelResolver to DestinationResolver 2013-07-05 11:11:19 -04:00
Rossen Stoyanchev 9dd7f6e5fb Update MessagingOperations hieararchy 2013-07-05 10:59:04 -04:00
Rossen Stoyanchev ef823721e5 Split AbstractMessagingTemplate across send/receive 2013-07-04 11:38:21 -04:00
Rossen Stoyanchev 078c766b80 Add new MessagingOperations ifc and class hieararchy 2013-07-04 11:23:40 -04:00
Rossen Stoyanchev 8560582c40 Add messaging.channel package 2013-07-03 20:59:17 -04:00
Phillip Webb 52d378d41f Add PublishSubscribeChannel
Add a PublishSubscribeChannel implementation of SubscribableChannel.
2013-07-03 20:44:53 -04:00
Phillip Webb 7a85827c48 Polish messaging code
Minor formatting and Javadoc changes.
2013-07-03 20:44:53 -04:00
Andy Wilkinson e694cc16c7 Consider original headers in pattern-based removal
When headers are being removed based on pattern matching, both the
new header names and the original header names need to be matched
against the pattern. Previously, only new headers were being
considered resulting in any matching original headers not being
removed.
2013-07-01 12:13:17 -04:00
Andy Wilkinson 98d7073370 Verify types when setting header
When a header is being set, verify that the type that's provided is
legal for the header that's been set. For example, the error channel's
type must be a MessageChannel or a String.

The method that performs type verification is protected so that it
can be overriden by sub-classes. It is expected that an overriding
method will call the super method.
2013-07-01 12:11:12 -04:00
Andy Wilkinson 465fc7638f Fix typo in MessageHeaderAccessor's class name
Remove the extra 's' from the class name
2013-06-28 13:01:52 +01:00
Rossen Stoyanchev d650e909b2 Merge branch 'master' into websocket-stomp 2013-06-27 15:58:12 -04:00
Rossen Stoyanchev 486b4101ec Introduce MessageHeader accessor types
A new type MessageHeaderAccesssor provides read/write access to
MessageHeaders along with typed getter/setter methods along the lines
of the existing MessageBuilder methods (internally MessageBuilder
merely delegates to MessageHeaderAccessor). This class is extensible
with sub-classes expected to provide typed getter/setter methods for
specific categories of message headers.

NativeMessageHeaderAccessor is one specific sub-class that further
provides read/write access to headers from some external message
source (e.g. STOMP headers). Native headers are stored in a separate
MultiValueMap and kept under a specific key.
2013-06-25 16:31:52 -04:00
Nick Williams 7b2c74b05c Improving method validation support for BV 1.1
Update MethodValidationPostProcessor.setValidator(...) to use
LocalValidatorFactoryBean.getValidator() when possible.

This is required because LocalValidatorFactoryBean does not directly
implement the forExecutables() method introduced in bean validation v1.1.

Issue: SPR-10644
2013-06-24 13:21:03 -07:00
Rossen Stoyanchev 32cb2ca2e7 Remove generic params from Message/MessageChannel 2013-06-24 11:14:48 -04:00
Phillip Webb eea230f2a8 Allow @CachePut 'key' SpEL to refer to #result
Allow the @CachePut 'key' SpEL to refer to the result of the method call
via a '#result' variable.

This change is particularly useful when working with JPA entities that
have generated @Id values since the ID will often not be available
until the entity has been saved.

Issue: SPR-10664
2013-06-23 09:07:16 -07:00
Phillip Webb f75d4e13a2 Polish cache abstraction code
Polish cache abstraction code and refactor CacheAspectSupport.
2013-06-23 09:07:16 -07:00
Sam Brannen b122ca688b Add missing @since tag to SimpleKey 2013-06-22 23:57:17 +02:00
Phillip Webb f1a18d29ba SimpleKeyGenerator to replace DefaultKeyGenerator
Introduce new SimpleKeyGenerator class to supersede DefaultKeyGenerator.
Unlike DefaultKeyGenerator, no collisions will occur with the keys
generated by SimpleKeyGenerator as the full parameter values are
considered within the SimpleKey.equals(...) method.

The SimpleKeyGenerator is now the default class used when no explicit
generator is configured.

Issue: SPR-10237
2013-06-21 12:21:29 -07:00
Phillip Webb a403e8f8b8 Inject @Configuration BeanFactory before autowire
Add EnhancedConfigurationBeanPostProcessor to inject the BeanFactory
into EnhancedConfiguration classes before the
AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues method
is called.

Prior to this commit it was possible for @Autowire in a @Configuration
class to invoke an enhanced configuration class method before the
BeanFactory was injected. This is due to the fact that the
AutowiredAnnotationBeanPostProcessor was called before
AbstractAutowireCapableBeanFactory.invokeAwareMethods().

Issue: SPR-10668
2013-06-20 20:21:18 -07:00
Rossen Stoyanchev 5cfc59d76d Refactor PubSubHeaders, StompHeaders, MessageBuilder
Rename to PubSubHeaderAccessor and StompHeaderAccessor
Move the renamed classes to support packages

Remove fromPayloadAndHeaders from MessageBuilder, just use
withPayload(..).copyHeaders(..) instead.
2013-06-19 11:41:43 -04:00
Rossen Stoyanchev c5b1f02c3a Add MessageBuilder 2013-06-14 16:30:02 -04:00
Sam Brannen e12311e364 Polish Javadoc 2013-06-14 16:06:57 +02:00
Andy Wilkinson 3022f5e34f Make Message type pluggable
To improve compatibility between Spring's messaging classes and
Spring Integration, the type of Message that is created has been made
pluggable through the introduction of a factory abstraction;
MessageFactory.

By default a MessageFactory is provided that will create
org.springframework.messaging.GenericMessage instances, however this
can be replaced with an alternative implementation. For example,
Spring Integration can provide an implementation that creates
org.springframework.integration.message.GenericMessage instances.

This control over the type of Message that's created allows messages
to flow from Spring messaging code into Spring Integration code without
any need for conversion. In further support of this goal,
MessageChannel, MessageHandler, and SubscribableChannel have been
genericized to make the Message type that they deal with more
flexible.
2013-06-14 12:34:12 +01:00
Rossen Stoyanchev d136d06eda Add method to create MessageHeaders in Message 2013-06-13 13:51:21 -04:00
Rossen Stoyanchev 3e0aac08dc Add SubscribableChannel and ReactorMessageChannel 2013-06-13 01:13:37 -04:00
Rossen Stoyanchev a1cfa3832e Polish 2013-06-13 01:13:04 -04:00
Phillip Webb b78dcc59fe Make ConfClassPostPro Ordered.HIGHEST_PRECEDENCE
Make ConfigurationClassPostProcessor Ordered.HIGHEST_PRECEDENCE in
case several BeanDefinitionRegistryPostProcessors are registered.

Issue: SPR-10645
2013-06-12 11:46:48 -07:00
Phillip Webb 2e2e9b8dd0 Improve support for @Conditional on @Configuration
Introduce new ConfigurationCondition interface allowing more
fine-grained control for @Conditional when used with @Configuration
beans.

Primarily added so that the evaluation of conditions that inspect bean
definitions can be deferred until all @Configuration classes have been
parsed.

Issue: SPR-10534
2013-06-12 11:45:20 -07:00
Rossen Stoyanchev d26b9d60e5 Refactor approach to working with STOMP headers 2013-06-11 01:52:32 -04:00
Phillip Webb e10e16cd6b Support fall-back to ASM parsing @Configuration
Update ConfigurationClassParser to fall-back to ASM parsing if standard
annotation processing fails. This change allows @Conditional annotations
that refer to missing classes to work.

This commit also introduces a new inner SourceClass object that
encapsulates the conditional logic required when reading the source
classes.

Issue: SPR-10646
2013-06-10 09:25:34 -07:00
Rossen Stoyanchev 84c55f90db Make MessageHeaders non-final 2013-06-10 10:09:24 -04:00
Rossen Stoyanchev de899820c9 Add Message, MessageChannel and refactor stomp support 2013-06-09 19:36:46 -04:00
Sam Brannen 96e1fbc3bb Polish @Conditional Javadoc and tests 2013-06-08 17:49:54 +02:00
Phillip Webb 239ce1466c Update @Conditional processing logic
Defer @Conditional processing on @Configuration classes until the bean
definitions are loaded, rather than when the @Configuration class is
parsed. This provides better support for @Conditional implementations
that inspect bean definitions.

This commit also fixes some minor problems with original implementation
and replaces the ConditionalAnnotationHelper class with
ConditionEvaluator.

Issue: SPR-10534
2013-06-04 10:27:51 -07:00
Phillip Webb 2ecc51f066 Do not consider all @Components as configuration
Update ConfigurationClassUtils to only consider beans with @Bean
methods as 'lite' configuration candidates.

Prior to this commit all @Component beans were considered 'lite'
configuration candidates which could result in a large number of
ConfigurationClass instance being created that would ultimately be
ignored.

Issue: SPR-10609
2013-06-04 10:26:31 -07:00
Phillip Webb a8fd832818 Support meta @Component with non-string value
Update AnnotationBeanNameGenerator to only use the value attribute of
a @Component meta-annotated annotation when it is a String.

Issue: SPR-10580
2013-06-04 10:23:23 -07:00
Phillip Webb 4d3383242e Support EnvironmentAware ImportSelector/Registrar
Add support for the EnvironmentAware interface with ImportSelector
and ImportBeanDefinitionRegistrar implementations.

Issue: SPR-10602
2013-06-03 12:19:47 -07:00