Skip to content

Commit 2ed3382

Browse files
committed
Document composed support for @scheduled, @JmsListener, & @SQL
Issue: SPR-13973
1 parent f35ec53 commit 2ed3382

File tree

6 files changed

+25
-6
lines changed

6 files changed

+25
-6
lines changed

spring-context/src/main/java/org/springframework/scheduling/annotation/Scheduled.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
* done manually or, more conveniently, through the {@code <task:annotation-driven/>}
3737
* element or @{@link EnableScheduling} annotation.
3838
*
39+
* <p>This annotation may be used as a <em>meta-annotation</em> to create custom
40+
* <em>composed annotations</em> with attribute overrides.
41+
*
3942
* @author Mark Fisher
4043
* @author Dave Syer
4144
* @author Chris Beams

spring-context/src/main/java/org/springframework/scheduling/annotation/Schedules.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2013 the original author or authors.
2+
* Copyright 2002-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -30,6 +30,9 @@
3030
* where {@link Scheduled} can simply be declared several times on the same method,
3131
* implicitly generating this container annotation.
3232
*
33+
* <p>This annotation may be used as a <em>meta-annotation</em> to create custom
34+
* <em>composed annotations</em>.
35+
*
3336
* @author Juergen Hoeller
3437
* @since 4.0
3538
* @see Scheduled

spring-jms/src/main/java/org/springframework/jms/annotation/JmsListener.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -66,6 +66,9 @@
6666
* {@link org.springframework.messaging.handler.annotation.SendTo @SendTo} to the
6767
* method declaration.
6868
*
69+
* <p>This annotation may be used as a <em>meta-annotation</em> to create custom
70+
* <em>composed annotations</em> with attribute overrides.
71+
*
6972
* @author Stephane Nicoll
7073
* @since 4.1
7174
* @see EnableJms

spring-jms/src/main/java/org/springframework/jms/annotation/JmsListeners.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -30,6 +30,9 @@
3030
* where {@link JmsListener} can simply be declared several times on the same method,
3131
* implicitly generating this container annotation.
3232
*
33+
* <p>This annotation may be used as a <em>meta-annotation</em> to create custom
34+
* <em>composed annotations</em>.
35+
*
3336
* @author Stephane Nicoll
3437
* @since 4.2
3538
* @see JmsListener

spring-test/src/main/java/org/springframework/test/context/jdbc/Sql.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
* multiple instances of {@code @Sql}.
5151
*
5252
* <p>This annotation may be used as a <em>meta-annotation</em> to create custom
53-
* <em>composed annotations</em>.
53+
* <em>composed annotations</em> with attribute overrides.
5454
*
5555
* @author Sam Brannen
5656
* @since 4.1

src/asciidoc/whats-new.adoc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -633,11 +633,14 @@ public @interface MyTestConfig {
633633
bean only defines one constructor.
634634
* `@Configuration` classes support constructor injection.
635635
* Any SpEL expression used to specify the `condition` of an `@EventListener` can
636-
now refer to beans (i.e. `@beanName.method()`).
636+
now refer to beans (e.g. `@beanName.method()`).
637637
* _Composed annotations_ can now override array attributes in meta-annotations
638638
with a single element of the component type of the array. For example, the
639639
`String[] path` attribute of `@RequestMapping` can be overridden with
640640
`String path` in a composed annotation.
641+
* `@Scheduled` and `@Schedules` may now be used as _meta-annotations_ to create
642+
custom _composed annotations_ with attribute overrides.
643+
641644

642645
=== Data Access Improvements
643646

@@ -661,7 +664,9 @@ Spring 4.3 also improves the caching abstraction as follows:
661664

662665
=== JMS Improvements
663666

664-
* `@SendTo` can now be specified at class-level to share a common reply destination.
667+
* `@SendTo` can now be specified at the class level to share a common reply destination.
668+
* `@JmsListener` and `@JmsListeners` may now be used as _meta-annotations_ to create
669+
custom _composed annotations_ with attribute overrides.
665670

666671
=== Web Improvements
667672

@@ -694,6 +699,8 @@ Spring 4.3 also improves the caching abstraction as follows:
694699
definitions have been loaded into the context but _before_ the context has been refreshed.
695700
Customizers can be registered globally by third parties, foregoing the need to implement a
696701
custom `ContextLoader`.
702+
* `@Sql` and `@SqlGroup` may now be used as _meta-annotations_ to create custom _composed
703+
annotations_ with attribute overrides.
697704
* Server-side Spring MVC Test supports expectations on response headers with multiple values.
698705
* Server-side Spring MVC Test parses form data request content and populates request parameters.
699706
* Client-side REST test support allows indicating how many times a request is expected and

0 commit comments

Comments
 (0)