类 WebMergedContextConfiguration

java.lang.Object
cn.taketoday.test.context.MergedContextConfiguration
cn.taketoday.test.context.web.WebMergedContextConfiguration
所有已实现的接口:
Serializable

public class WebMergedContextConfiguration extends MergedContextConfiguration
WebMergedContextConfiguration encapsulates the merged context configuration declared on a test class and all of its superclasses via @ContextConfiguration, @WebAppConfiguration, and @ActiveProfiles.

WebMergedContextConfiguration extends the contract of MergedContextConfiguration by adding support for the resource base path configured via @WebAppConfiguration. This allows the TestContext to properly cache the corresponding WebApplicationContext that was loaded using properties of this WebMergedContextConfiguration.

从以下版本开始:
4.0
作者:
Sam Brannen, Harry Yang
另请参阅:
  • 字段详细资料

    • serialVersionUID

      private static final long serialVersionUID
      另请参阅:
    • resourceBasePath

      private final String resourceBasePath
  • 构造器详细资料

    • WebMergedContextConfiguration

      public WebMergedContextConfiguration(MergedContextConfiguration mergedConfig, String resourceBasePath)
      Create a new WebMergedContextConfiguration instance by copying all properties from the supplied MergedContextConfiguration.

      If an empty value is supplied for the resourceBasePath an empty string will be used.

      参数:
      resourceBasePath - the resource path to the root directory of the web application
    • WebMergedContextConfiguration

      public WebMergedContextConfiguration(Class<?> testClass, @Nullable String[] locations, @Nullable Class<?>[] classes, @Nullable Set<Class<? extends cn.taketoday.context.ApplicationContextInitializer>> contextInitializerClasses, @Nullable String[] activeProfiles, @Nullable String[] propertySourceLocations, @Nullable String[] propertySourceProperties, String resourceBasePath, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, @Nullable MergedContextConfiguration parent)
      Create a new WebMergedContextConfiguration instance for the supplied parameters.

      If a null value is supplied for locations, classes, activeProfiles, propertySourceLocations, or propertySourceProperties an empty array will be stored instead. If a null value is supplied for the contextInitializerClasses an empty set will be stored instead. If an empty value is supplied for the resourceBasePath an empty string will be used. Furthermore, active profiles will be sorted, and duplicate profiles will be removed.

      参数:
      testClass - the test class for which the configuration was merged
      locations - the merged resource locations
      classes - the merged annotated classes
      contextInitializerClasses - the merged context initializer classes
      activeProfiles - the merged active bean definition profiles
      propertySourceLocations - the merged PropertySource locations
      propertySourceProperties - the merged PropertySource properties
      resourceBasePath - the resource path to the root directory of the web application
      contextLoader - the resolved ContextLoader
      cacheAwareContextLoaderDelegate - a cache-aware context loader delegate with which to retrieve the parent context
      parent - the parent configuration or null if there is no parent
    • WebMergedContextConfiguration

      public WebMergedContextConfiguration(Class<?> testClass, @Nullable String[] locations, @Nullable Class<?>[] classes, @Nullable Set<Class<? extends cn.taketoday.context.ApplicationContextInitializer>> contextInitializerClasses, @Nullable String[] activeProfiles, @Nullable String[] propertySourceLocations, @Nullable String[] propertySourceProperties, @Nullable Set<ContextCustomizer> contextCustomizers, String resourceBasePath, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, @Nullable MergedContextConfiguration parent)
      Create a new WebMergedContextConfiguration instance for the supplied parameters.

      If a null value is supplied for locations, classes, activeProfiles, propertySourceLocations, or propertySourceProperties an empty array will be stored instead. If a null value is supplied for contextInitializerClasses or contextCustomizers, an empty set will be stored instead. If an empty value is supplied for the resourceBasePath an empty string will be used. Furthermore, active profiles will be sorted, and duplicate profiles will be removed.

      参数:
      testClass - the test class for which the configuration was merged
      locations - the merged context resource locations
      classes - the merged annotated classes
      contextInitializerClasses - the merged context initializer classes
      activeProfiles - the merged active bean definition profiles
      propertySourceLocations - the merged PropertySource locations
      propertySourceProperties - the merged PropertySource properties
      contextCustomizers - the context customizers
      resourceBasePath - the resource path to the root directory of the web application
      contextLoader - the resolved ContextLoader
      cacheAwareContextLoaderDelegate - a cache-aware context loader delegate with which to retrieve the parent context
      parent - the parent configuration or null if there is no parent
    • WebMergedContextConfiguration

      public WebMergedContextConfiguration(Class<?> testClass, @Nullable String[] locations, @Nullable Class<?>[] classes, @Nullable Set<Class<? extends cn.taketoday.context.ApplicationContextInitializer>> contextInitializerClasses, @Nullable String[] activeProfiles, List<cn.taketoday.core.io.PropertySourceDescriptor> propertySourceDescriptors, @Nullable String[] propertySourceProperties, @Nullable Set<ContextCustomizer> contextCustomizers, String resourceBasePath, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, @Nullable MergedContextConfiguration parent)
      Create a new WebMergedContextConfiguration instance for the supplied parameters.

      If a null value is supplied for locations, classes, activeProfiles, or propertySourceProperties an empty array will be stored instead. If a null value is supplied for contextInitializerClasses or contextCustomizers, an empty set will be stored instead. Furthermore, active profiles will be sorted, and duplicate profiles will be removed.

      参数:
      testClass - the test class for which the configuration was merged
      locations - the merged context resource locations
      classes - the merged annotated classes
      contextInitializerClasses - the merged context initializer classes
      activeProfiles - the merged active bean definition profiles
      propertySourceDescriptors - the merged property source descriptors
      propertySourceProperties - the merged inlined properties
      contextCustomizers - the context customizers
      resourceBasePath - the resource path to the root directory of the web application
      contextLoader - the resolved ContextLoader
      cacheAwareContextLoaderDelegate - a cache-aware context loader delegate with which to retrieve the parent ApplicationContext
      parent - the parent configuration or null if there is no parent
  • 方法详细资料