|
25 | 25 |
|
26 | 26 | import org.springframework.context.ApplicationContextInitializer;
|
27 | 27 | import org.springframework.context.ConfigurableApplicationContext;
|
| 28 | +import org.springframework.core.annotation.AliasFor; |
28 | 29 | import org.springframework.test.context.ContextConfiguration;
|
29 | 30 |
|
30 | 31 | /**
|
31 | 32 | * Class-level annotation that is used to determine how to load and configure an
|
32 |
| - * ApplicationContext for integration tests. Similar to the standard |
33 |
| - * {@link ContextConfiguration} but uses Spring Boot's |
34 |
| - * {@link SpringApplicationContextLoader}. |
| 33 | + * {@code ApplicationContext} for integration tests. |
| 34 | + * <p>Similar to the standard {@link ContextConfiguration @ContextConfiguration} |
| 35 | + * but uses Spring Boot's {@link SpringApplicationContextLoader}. |
35 | 36 | *
|
36 | 37 | * @author Dave Syer
|
| 38 | + * @author Sam Brannen |
37 | 39 | * @see SpringApplicationContextLoader
|
| 40 | + * @see ContextConfiguration |
38 | 41 | */
|
39 | 42 | @ContextConfiguration(loader = SpringApplicationContextLoader.class)
|
40 | 43 | @Documented
|
|
44 | 47 | public @interface SpringApplicationConfiguration {
|
45 | 48 |
|
46 | 49 | /**
|
47 |
| - * @see ContextConfiguration#locations() |
| 50 | + * @see ContextConfiguration#locations |
48 | 51 | * @return the context configuration locations
|
49 | 52 | */
|
| 53 | + @AliasFor(annotation = ContextConfiguration.class, attribute = "locations") |
50 | 54 | String[] locations() default {};
|
51 | 55 |
|
52 | 56 | /**
|
53 |
| - * @see ContextConfiguration#classes() |
| 57 | + * @see ContextConfiguration#classes |
54 | 58 | * @return the context configuration classes
|
55 | 59 | */
|
| 60 | + @AliasFor(annotation = ContextConfiguration.class, attribute = "classes") |
56 | 61 | Class<?>[] classes() default {};
|
57 | 62 |
|
58 | 63 | /**
|
59 |
| - * @see ContextConfiguration#initializers() |
| 64 | + * @see ContextConfiguration#initializers |
60 | 65 | * @return the context configuration initializers
|
61 | 66 | */
|
| 67 | + @AliasFor(annotation = ContextConfiguration.class, attribute = "initializers") |
62 | 68 | Class<? extends ApplicationContextInitializer<? extends ConfigurableApplicationContext>>[] initializers() default {};
|
63 | 69 |
|
64 | 70 | /**
|
65 |
| - * @see ContextConfiguration#inheritLocations() |
66 |
| - * @return if context locations should be inherited |
| 71 | + * @see ContextConfiguration#inheritLocations |
| 72 | + * @return {@code true} if context locations should be inherited |
67 | 73 | */
|
| 74 | + @AliasFor(annotation = ContextConfiguration.class, attribute = "inheritLocations") |
68 | 75 | boolean inheritLocations() default true;
|
69 | 76 |
|
70 | 77 | /**
|
71 |
| - * @see ContextConfiguration#inheritInitializers() |
72 |
| - * @return if context initializers should be inherited |
| 78 | + * @see ContextConfiguration#inheritInitializers |
| 79 | + * @return {@code true} if context initializers should be inherited |
73 | 80 | */
|
| 81 | + @AliasFor(annotation = ContextConfiguration.class, attribute = "inheritInitializers") |
74 | 82 | boolean inheritInitializers() default true;
|
75 | 83 |
|
76 | 84 | /**
|
77 |
| - * @see ContextConfiguration#name() |
78 |
| - * @return if context configuration name |
| 85 | + * @see ContextConfiguration#name |
| 86 | + * @return the name of the context hierarchy level |
79 | 87 | */
|
| 88 | + @AliasFor(annotation = ContextConfiguration.class, attribute = "name") |
80 | 89 | String name() default "";
|
81 | 90 |
|
82 | 91 | }
|
0 commit comments