Polish attribute alias examples in "what's new"

master
Sam Brannen 9 years ago
parent 110ccaa721
commit 595f9bfc41
  1. 14
      src/asciidoc/whats-new.adoc

@ -427,13 +427,13 @@ method has been added.
[subs="verbatim,quotes"] [subs="verbatim,quotes"]
---- ----
public @interface ContextConfiguration { public @interface ContextConfiguration {
@AliasFor(attribute = "locations") @AliasFor(attribute = "locations")
String[] value() default {}; String[] value() default {};
@AliasFor(attribute = "value") @AliasFor(attribute = "value")
String[] locations() default {}; String[] locations() default {};
// ... // ...
} }
---- ----
@ -442,17 +442,17 @@ public @interface ContextConfiguration {
over exactly which attributes are overridden within an annotation over exactly which attributes are overridden within an annotation
hierarchy. In fact, it is now possible to declare an alias for the hierarchy. In fact, it is now possible to declare an alias for the
`value` attribute of a meta-annotation. `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. attribute override as follows.
[source,java,indent=0] [source,java,indent=0]
[subs="verbatim,quotes"] [subs="verbatim,quotes"]
---- ----
@ContextConfiguration @ContextConfiguration
public @interface MyTestConfig { public @interface MyTestConfig {
@AliasFor(annotation = ContextConfiguration.class, attribute = "locations") @AliasFor(annotation = ContextConfiguration.class, attribute = "value")
String[] xmlFiles(); String[] xmlFiles();
// ... // ...
} }
---- ----

Loading…
Cancel
Save