Polish attribute alias examples in "what's new"

This commit is contained in:
Sam Brannen
2015-06-29 17:07:48 +02:00
parent 110ccaa721
commit 595f9bfc41

View File

@@ -427,13 +427,13 @@ method has been added.
[subs="verbatim,quotes"]
----
public @interface ContextConfiguration {
@AliasFor(attribute = "locations")
String[] value() default {};
@AliasFor(attribute = "value")
String[] locations() default {};
// ...
}
----
@@ -442,17 +442,17 @@ public @interface ContextConfiguration {
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, one can now develop a composed annotation with a custom
** For example, one can now develop a composed annotation with a custom
attribute override as follows.
[source,java,indent=0]
[subs="verbatim,quotes"]
----
@ContextConfiguration
public @interface MyTestConfig {
@AliasFor(annotation = ContextConfiguration.class, attribute = "locations")
@AliasFor(annotation = ContextConfiguration.class, attribute = "value")
String[] xmlFiles();
// ...
}
----