|
|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2002-2015 the original author or authors. |
|
|
|
* Copyright 2002-2016 the original author or authors. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
@ -51,7 +51,6 @@ public @interface ActiveProfiles { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Alias for {@link #profiles}. |
|
|
|
* Alias for {@link #profiles}. |
|
|
|
* |
|
|
|
|
|
|
|
* <p>This attribute may <strong>not</strong> be used in conjunction with |
|
|
|
* <p>This attribute may <strong>not</strong> be used in conjunction with |
|
|
|
* {@link #profiles}, but it may be used <em>instead</em> of {@link #profiles}. |
|
|
|
* {@link #profiles}, but it may be used <em>instead</em> of {@link #profiles}. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ -60,7 +59,6 @@ public @interface ActiveProfiles { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* The bean definition profiles to activate. |
|
|
|
* The bean definition profiles to activate. |
|
|
|
* |
|
|
|
|
|
|
|
* <p>This attribute may <strong>not</strong> be used in conjunction with |
|
|
|
* <p>This attribute may <strong>not</strong> be used in conjunction with |
|
|
|
* {@link #value}, but it may be used <em>instead</em> of {@link #value}. |
|
|
|
* {@link #value}, but it may be used <em>instead</em> of {@link #value}. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ -70,7 +68,6 @@ public @interface ActiveProfiles { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* The type of {@link ActiveProfilesResolver} to use for resolving the active |
|
|
|
* The type of {@link ActiveProfilesResolver} to use for resolving the active |
|
|
|
* bean definition profiles programmatically. |
|
|
|
* bean definition profiles programmatically. |
|
|
|
* |
|
|
|
|
|
|
|
* @since 4.0 |
|
|
|
* @since 4.0 |
|
|
|
* @see ActiveProfilesResolver |
|
|
|
* @see ActiveProfilesResolver |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ -79,18 +76,15 @@ public @interface ActiveProfiles { |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Whether or not bean definition profiles from superclasses should be |
|
|
|
* Whether or not bean definition profiles from superclasses should be |
|
|
|
* <em>inherited</em>. |
|
|
|
* <em>inherited</em>. |
|
|
|
* |
|
|
|
|
|
|
|
* <p>The default value is {@code true}, which means that a test |
|
|
|
* <p>The default value is {@code true}, which means that a test |
|
|
|
* class will <em>inherit</em> bean definition profiles defined by a |
|
|
|
* class will <em>inherit</em> bean definition profiles defined by a |
|
|
|
* test superclass. Specifically, the bean definition profiles for a test |
|
|
|
* test superclass. Specifically, the bean definition profiles for a test |
|
|
|
* class will be appended to the list of bean definition profiles |
|
|
|
* class will be appended to the list of bean definition profiles |
|
|
|
* defined by a test superclass. Thus, subclasses have the option of |
|
|
|
* defined by a test superclass. Thus, subclasses have the option of |
|
|
|
* <em>extending</em> the list of bean definition profiles. |
|
|
|
* <em>extending</em> the list of bean definition profiles. |
|
|
|
* |
|
|
|
|
|
|
|
* <p>If {@code inheritProfiles} is set to {@code false}, the bean |
|
|
|
* <p>If {@code inheritProfiles} is set to {@code false}, the bean |
|
|
|
* definition profiles for the test class will <em>shadow</em> and |
|
|
|
* definition profiles for the test class will <em>shadow</em> and |
|
|
|
* effectively replace any bean definition profiles defined by a superclass. |
|
|
|
* effectively replace any bean definition profiles defined by a superclass. |
|
|
|
* |
|
|
|
|
|
|
|
* <p>In the following example, the {@code ApplicationContext} for |
|
|
|
* <p>In the following example, the {@code ApplicationContext} for |
|
|
|
* {@code BaseTest} will be loaded using only the "base" |
|
|
|
* {@code BaseTest} will be loaded using only the "base" |
|
|
|
* bean definition profile; beans defined in the "extended" profile |
|
|
|
* bean definition profile; beans defined in the "extended" profile |
|
|
|
@ -110,11 +104,9 @@ public @interface ActiveProfiles { |
|
|
|
* // ...
|
|
|
|
* // ...
|
|
|
|
* } |
|
|
|
* } |
|
|
|
* </pre> |
|
|
|
* </pre> |
|
|
|
* |
|
|
|
|
|
|
|
* <p>Note: {@code @ActiveProfiles} can be used when loading an |
|
|
|
* <p>Note: {@code @ActiveProfiles} can be used when loading an |
|
|
|
* {@code ApplicationContext} from path-based resource locations or |
|
|
|
* {@code ApplicationContext} from path-based resource locations or |
|
|
|
* annotated classes. |
|
|
|
* annotated classes. |
|
|
|
* |
|
|
|
|
|
|
|
* @see ContextConfiguration#locations |
|
|
|
* @see ContextConfiguration#locations |
|
|
|
* @see ContextConfiguration#classes |
|
|
|
* @see ContextConfiguration#classes |
|
|
|
* @see ContextConfiguration#inheritLocations |
|
|
|
* @see ContextConfiguration#inheritLocations |
|
|
|
|