类的使用
cn.taketoday.test.context.MergedContextConfiguration
程序包
说明
Classes and annotations related to configuring Infra
ApplicationContext for
tests.Test support for
cn.taketoday.framework.context.TypeExcludeFilter.Support for testing JSON.
Mockito integration for tests.
Web client test utilities.
Infra support for testing server endpoints via
WebTestClient.This package contains the TestContext Framework which
provides annotation-driven unit and integration testing support that is
agnostic of the actual testing framework in use.
Ahead-of-time (AOT) support for the Infra TestContext Framework.
Support for context caching within the TestContext Framework.
Support classes for the TestContext Framework.
Web support classes for the TestContext Framework.
WebSocket support classes for the TestContext Framework.
-
cn.taketoday.framework.test.context中MergedContextConfiguration的使用
修饰符和类型类说明classEncapsulates the merged context configuration declared on a test class and all of its superclasses for a reactive web application.修饰符和类型字段说明private final MergedContextConfigurationInfraApplicationContextLoader.ContextCustomizerAdapter.configprivate final MergedContextConfigurationInfraApplicationContextLoader.PrepareEnvironmentListener.config修饰符和类型方法说明protected final MergedContextConfigurationInfraTestContextBootstrapper.createModifiedConfig(MergedContextConfiguration mergedConfig, Class<?>[] classes) Create a newMergedContextConfigurationwith different classes.protected final MergedContextConfigurationInfraTestContextBootstrapper.createModifiedConfig(MergedContextConfiguration mergedConfig, Class<?>[] classes, String[] propertySourceProperties) Create a newMergedContextConfigurationwith different classes and properties.protected MergedContextConfigurationInfraTestContextBootstrapper.processMergedContextConfiguration(MergedContextConfiguration mergedConfig) 修饰符和类型方法说明(专用程序包) voidInfraApplicationContextLoader.WebConfigurer.configure(MergedContextConfiguration configuration, cn.taketoday.framework.Application application, List<cn.taketoday.context.ApplicationContextInitializer> initializers) protected final MergedContextConfigurationInfraTestContextBootstrapper.createModifiedConfig(MergedContextConfiguration mergedConfig, Class<?>[] classes) Create a newMergedContextConfigurationwith different classes.protected final MergedContextConfigurationInfraTestContextBootstrapper.createModifiedConfig(MergedContextConfiguration mergedConfig, Class<?>[] classes, String[] propertySourceProperties) Create a newMergedContextConfigurationwith different classes and properties.voidImportsContextCustomizer.customizeContext(cn.taketoday.context.ConfigurableApplicationContext context, MergedContextConfiguration mergedContextConfiguration) voidInfraTestArgs.customizeContext(cn.taketoday.context.ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig) voidInfraTestWebEnvironment.customizeContext(cn.taketoday.context.ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig) protected StringInfraTestContextBootstrapper.determineResourceBasePath(MergedContextConfiguration configuration) Determines the resource base path for web applications using the value of@WebAppConfiguration, if any, on the test class of the givenconfiguration.InfraTestContextBootstrapper.getAndProcessPropertySourceProperties(MergedContextConfiguration mergedConfig) private cn.taketoday.framework.ApplicationTypeInfraTestContextBootstrapper.getApplicationType(MergedContextConfiguration configuration) protected List<cn.taketoday.context.ApplicationContextInitializer>InfraApplicationContextLoader.getInitializers(MergedContextConfiguration config, cn.taketoday.framework.Application application) Return theinitializersthat will be applied to the context.protected String[]InfraApplicationContextLoader.getInlinedProperties(MergedContextConfiguration config) protected Class<?>[]InfraTestContextBootstrapper.getOrFindConfigurationClasses(MergedContextConfiguration mergedConfig) private booleanInfraApplicationContextLoader.isEmbeddedWebEnvironment(MergedContextConfiguration config) private booleanInfraTestContextBootstrapper.isFromConfiguration(MergedContextConfiguration candidateConfig, ContextConfiguration configuration) private booleanInfraTestContextBootstrapper.isWebEnvironmentSupported(MergedContextConfiguration mergedConfig) cn.taketoday.context.ApplicationContextInfraApplicationContextLoader.loadContext(MergedContextConfiguration config) private voidInfraApplicationContextLoader.prepareEnvironment(MergedContextConfiguration config, cn.taketoday.framework.Application application, cn.taketoday.core.env.ConfigurableEnvironment environment, boolean applicationEnvironment) protected MergedContextConfigurationInfraTestContextBootstrapper.processMergedContextConfiguration(MergedContextConfiguration mergedConfig) protected voidInfraTestContextBootstrapper.processPropertySourceProperties(MergedContextConfiguration mergedConfig, List<String> propertySourceProperties) Post process the property source properties, adding or removing elements as required.限定符构造器说明(专用程序包)ContextCustomizerAdapter(ContextCustomizer contextCustomizer, MergedContextConfiguration config) (专用程序包) -
cn.taketoday.framework.test.context.filter中MergedContextConfiguration的使用
修饰符和类型方法说明voidExcludeFilterContextCustomizer.customizeContext(cn.taketoday.context.ConfigurableApplicationContext context, MergedContextConfiguration mergedContextConfiguration) -
cn.taketoday.framework.test.json中MergedContextConfiguration的使用
修饰符和类型方法说明voidDuplicateJsonObjectContextCustomizerFactory.DuplicateJsonObjectContextCustomizer.customizeContext(cn.taketoday.context.ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig) -
cn.taketoday.framework.test.mock.mockito中MergedContextConfiguration的使用
修饰符和类型方法说明voidMockitoContextCustomizer.customizeContext(cn.taketoday.context.ConfigurableApplicationContext context, MergedContextConfiguration mergedContextConfiguration) -
cn.taketoday.framework.test.web.client中MergedContextConfiguration的使用
修饰符和类型方法说明voidTestRestTemplateContextCustomizer.customizeContext(cn.taketoday.context.ConfigurableApplicationContext context, MergedContextConfiguration mergedContextConfiguration) -
cn.taketoday.framework.test.web.reactive.server中MergedContextConfiguration的使用
修饰符和类型方法说明voidWebTestClientContextCustomizer.customizeContext(cn.taketoday.context.ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig) -
cn.taketoday.test.context中MergedContextConfiguration的使用
修饰符和类型方法说明TestContextBootstrapper.buildMergedContextConfiguration()Build the merged context configuration for the test class in theBootstrapContextassociated with this bootstrapper.MergedContextConfiguration.getParent()Get theMergedContextConfigurationfor the parent application context in a context hierarchy.修饰符和类型方法说明voidCacheAwareContextLoaderDelegate.closeContext(MergedContextConfiguration mergedContextConfiguration, DirtiesContext.HierarchyMode hierarchyMode) Remove the application context for the suppliedMergedContextConfigurationfrom theContextCacheand close it if it is an instance ofConfigurableApplicationContext.voidContextCustomizer.customizeContext(cn.taketoday.context.ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig) Customize the suppliedConfigurableApplicationContextafter bean definitions have been loaded into the context but before the context has been refreshed.default booleanCacheAwareContextLoaderDelegate.isContextLoaded(MergedContextConfiguration mergedContextConfiguration) Determine if the application context for the suppliedMergedContextConfigurationhas been loaded (i.e., is present in theContextCache).cn.taketoday.context.ApplicationContextCacheAwareContextLoaderDelegate.loadContext(MergedContextConfiguration mergedConfig) Load the application context for the suppliedMergedContextConfigurationby delegating to theContextLoaderconfigured in the givenMergedContextConfiguration.cn.taketoday.context.ApplicationContextSmartContextLoader.loadContext(MergedContextConfiguration mergedConfig) Load a newApplicationContextbased on the suppliedMergedContextConfiguration, configure the context, and return the context in a fully refreshed state.限定符构造器说明MergedContextConfiguration(MergedContextConfiguration mergedConfig) Create a newMergedContextConfigurationinstance by copying all fields from the suppliedMergedContextConfiguration.MergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends cn.taketoday.context.ApplicationContextInitializer>> contextInitializerClasses, String[] activeProfiles, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent) Create a newMergedContextConfigurationinstance for the supplied parameters.MergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends cn.taketoday.context.ApplicationContextInitializer>> contextInitializerClasses, String[] activeProfiles, String[] propertySourceLocations, String[] propertySourceProperties, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent) Create a newMergedContextConfigurationinstance for the supplied parameters.MergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends cn.taketoday.context.ApplicationContextInitializer>> contextInitializerClasses, String[] activeProfiles, String[] propertySourceLocations, String[] propertySourceProperties, Set<ContextCustomizer> contextCustomizers, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent) Create a newMergedContextConfigurationinstance for the supplied parameters.MergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends cn.taketoday.context.ApplicationContextInitializer>> contextInitializerClasses, String[] activeProfiles, List<cn.taketoday.core.io.PropertySourceDescriptor> propertySourceDescriptors, String[] propertySourceProperties, Set<ContextCustomizer> contextCustomizers, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent) Create a newMergedContextConfigurationinstance for the supplied parameters. -
cn.taketoday.test.context.aot中MergedContextConfiguration的使用
修饰符和类型方法说明private MergedContextConfigurationTestContextAotGenerator.buildMergedContextConfiguration(Class<?> testClass) 修饰符和类型方法说明cn.taketoday.context.ApplicationContextAotContextLoader.loadContextForAotProcessing(MergedContextConfiguration mergedConfig) Load a newApplicationContextfor AOT build-time processing based on the suppliedMergedContextConfiguration, configure the context, and return the context.private cn.taketoday.context.support.GenericApplicationContextTestContextAotGenerator.loadContextForAotProcessing(MergedContextConfiguration mergedConfig) Load theGenericApplicationContextfor the supplied merged context configuration for AOT processing.cn.taketoday.context.ApplicationContextAotContextLoader.loadContextForAotRuntime(MergedContextConfiguration mergedConfig, cn.taketoday.context.ApplicationContextInitializer initializer) Load a newApplicationContextfor AOT run-time execution based on the suppliedMergedContextConfigurationandApplicationContextInitializer.(专用程序包) cn.taketoday.javapoet.ClassNameTestContextAotGenerator.processAheadOfTime(MergedContextConfiguration mergedConfig, cn.taketoday.aot.generate.GenerationContext generationContext) Process the specifiedMergedContextConfigurationahead-of-time using the specifiedGenerationContext.voidMergedContextConfigurationRuntimeHints.registerHints(cn.taketoday.aot.hint.RuntimeHints runtimeHints, MergedContextConfiguration mergedConfig, ClassLoader classLoader) 类型变量类型为MergedContextConfiguration的cn.taketoday.test.context.aot中的方法参数修饰符和类型方法说明private cn.taketoday.util.MultiValueMap<cn.taketoday.javapoet.ClassName,Class<?>> TestContextAotGenerator.processAheadOfTime(cn.taketoday.util.MultiValueMap<MergedContextConfiguration, Class<?>> mergedConfigMappings) -
cn.taketoday.test.context.cache中MergedContextConfiguration的使用
修饰符和类型类说明(专用程序包) final classMergedContextConfigurationimplementation based on an AOT-generatedApplicationContextInitializerthat is used to load an AOT-optimizedApplicationContext.修饰符和类型字段说明private final Map<MergedContextConfiguration,cn.taketoday.context.ApplicationContext> DefaultContextCache.contextMapMap of context keys to InfraApplicationContextinstances.private final Map<MergedContextConfiguration,Integer> DefaultContextCache.failureCountsMap of context keys to context load failure counts.private final Map<MergedContextConfiguration,Set<MergedContextConfiguration>> DefaultContextCache.hierarchyMapMap of parent keys to sets of children keys, representing a top-down tree of context hierarchies.private final Map<MergedContextConfiguration,Set<MergedContextConfiguration>> DefaultContextCache.hierarchyMapMap of parent keys to sets of children keys, representing a top-down tree of context hierarchies.修饰符和类型方法说明(专用程序包) MergedContextConfigurationAotMergedContextConfiguration.getOriginal()Get the originalMergedContextConfigurationthat thisAotMergedContextConfigurationwas created for.private MergedContextConfigurationDefaultCacheAwareContextLoaderDelegate.replaceIfNecessary(MergedContextConfiguration mergedConfig) If the test class associated with the suppliedMergedContextConfigurationhas an AOT-optimizedApplicationContext, this method will create anAotMergedContextConfigurationto replace the providedMergedContextConfiguration.修饰符和类型方法说明voidDefaultCacheAwareContextLoaderDelegate.closeContext(MergedContextConfiguration mergedConfig, DirtiesContext.HierarchyMode hierarchyMode) booleanContextCache.contains(MergedContextConfiguration key) Determine whether there is a cached context for the given key.booleanDefaultContextCache.contains(MergedContextConfiguration key) Determine whether there is a cached context for the given key.cn.taketoday.context.ApplicationContextContextCache.get(MergedContextConfiguration key) Obtain a cachedApplicationContextfor the given key.cn.taketoday.context.ApplicationContextDefaultContextCache.get(MergedContextConfiguration key) Obtain a cachedApplicationContextfor the given key.private ContextLoaderDefaultCacheAwareContextLoaderDelegate.getContextLoader(MergedContextConfiguration mergedConfig) default intContextCache.getFailureCount(MergedContextConfiguration key) Get the failure count for the given key.intDefaultContextCache.getFailureCount(MergedContextConfiguration key) Get the failure count for the given key.default voidContextCache.incrementFailureCount(MergedContextConfiguration key) Increment the failure count for the given key.voidDefaultContextCache.incrementFailureCount(MergedContextConfiguration key) Increment the failure count for the given key.booleanDefaultCacheAwareContextLoaderDelegate.isContextLoaded(MergedContextConfiguration mergedConfig) cn.taketoday.context.ApplicationContextDefaultCacheAwareContextLoaderDelegate.loadContext(MergedContextConfiguration mergedConfig) protected cn.taketoday.context.ApplicationContextDefaultCacheAwareContextLoaderDelegate.loadContextInternal(MergedContextConfiguration mergedConfig) Load theApplicationContextfor the supplied merged context configuration.voidContextCache.put(MergedContextConfiguration key, cn.taketoday.context.ApplicationContext context) Explicitly add anApplicationContextinstance to the cache under the given key, potentially honoring a custom eviction policy.voidDefaultContextCache.put(MergedContextConfiguration key, cn.taketoday.context.ApplicationContext context) Explicitly add anApplicationContextinstance to the cache under the given key, potentially honoring a custom eviction policy.voidContextCache.remove(MergedContextConfiguration key, DirtiesContext.HierarchyMode hierarchyMode) Remove the context with the given key from the cache and explicitly close it if it is an instance ofConfigurableApplicationContext.voidDefaultContextCache.remove(MergedContextConfiguration key, DirtiesContext.HierarchyMode hierarchyMode) Remove the context with the given key from the cache and explicitly close it if it is an instance ofConfigurableApplicationContext.private voidDefaultContextCache.remove(List<MergedContextConfiguration> removedContexts, MergedContextConfiguration key) private MergedContextConfigurationDefaultCacheAwareContextLoaderDelegate.replaceIfNecessary(MergedContextConfiguration mergedConfig) If the test class associated with the suppliedMergedContextConfigurationhas an AOT-optimizedApplicationContext, this method will create anAotMergedContextConfigurationto replace the providedMergedContextConfiguration.修饰符和类型方法说明private voidDefaultContextCache.remove(List<MergedContextConfiguration> removedContexts, MergedContextConfiguration key) protected booleanDefaultContextCache.LruCache.removeEldestEntry(Map.Entry<MergedContextConfiguration, cn.taketoday.context.ApplicationContext> eldest) 限定符构造器说明(专用程序包)AotMergedContextConfiguration(Class<?> testClass, Class<? extends cn.taketoday.context.ApplicationContextInitializer> contextInitializerClass, MergedContextConfiguration original, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate) -
cn.taketoday.test.context.support中MergedContextConfiguration的使用
修饰符和类型方法说明private MergedContextConfigurationAbstractTestContextBootstrapper.buildDefaultMergedContextConfiguration(Class<?> testClass, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate) AbstractTestContextBootstrapper.buildMergedContextConfiguration()Build the merged context configuration for the test class in theBootstrapContextassociated with this bootstrapper.private MergedContextConfigurationAbstractTestContextBootstrapper.buildMergedContextConfiguration(Class<?> testClass, List<ContextConfigurationAttributes> configAttributesList, MergedContextConfiguration parentConfig, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, boolean requireLocationsClassesOrInitializers) Build themerged context configurationfor the suppliedtestClass, context configuration attributes, and parent context configuration.protected MergedContextConfigurationAbstractTestContextBootstrapper.processMergedContextConfiguration(MergedContextConfiguration mergedConfig) Process the supplied, newly instantiatedMergedContextConfigurationinstance.修饰符和类型方法说明private MergedContextConfigurationAbstractTestContextBootstrapper.buildMergedContextConfiguration(Class<?> testClass, List<ContextConfigurationAttributes> configAttributesList, MergedContextConfiguration parentConfig, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, boolean requireLocationsClassesOrInitializers) Build themerged context configurationfor the suppliedtestClass, context configuration attributes, and parent context configuration.protected voidAbstractContextLoader.customizeContext(cn.taketoday.context.ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig) Customize theConfigurableApplicationContextcreated by thisContextLoaderafter bean definitions have been loaded into the context but before the context has been refreshed.voidDynamicPropertiesContextCustomizer.customizeContext(cn.taketoday.context.ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig) private AotContextLoaderAbstractDelegatingSmartContextLoader.getAotContextLoader(MergedContextConfiguration mergedConfig) private SmartContextLoaderAbstractDelegatingSmartContextLoader.getContextLoader(MergedContextConfiguration mergedConfig) private static booleanAbstractDelegatingSmartContextLoader.hasInitializersOrCustomizers(MergedContextConfiguration mergedConfig) private voidAbstractContextLoader.invokeApplicationContextInitializers(cn.taketoday.context.ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig) protected voidAbstractGenericContextLoader.loadBeanDefinitions(cn.taketoday.context.support.GenericApplicationContext context, MergedContextConfiguration mergedConfig) Load bean definitions into the suppliedcontextfrom the locations or classes in the suppliedMergedContextConfiguration.protected voidAnnotationConfigContextLoader.loadBeanDefinitions(cn.taketoday.context.support.GenericApplicationContext context, MergedContextConfiguration mergedConfig) Register classes in the suppliedcontextfrom the classes in the suppliedMergedContextConfiguration.final cn.taketoday.context.ApplicationContextAbstractDelegatingSmartContextLoader.loadContext(MergedContextConfiguration mergedConfig) Delegates to an appropriate candidateSmartContextLoaderto load anApplicationContext.final cn.taketoday.context.ApplicationContextAbstractGenericContextLoader.loadContext(MergedContextConfiguration mergedConfig) Load aGenericApplicationContextfor the suppliedMergedContextConfiguration.private cn.taketoday.context.support.GenericApplicationContextAbstractGenericContextLoader.loadContext(MergedContextConfiguration mergedConfig, boolean forAotProcessing) Load aGenericApplicationContextfor the suppliedMergedContextConfiguration.final cn.taketoday.context.ApplicationContextAbstractDelegatingSmartContextLoader.loadContextForAotProcessing(MergedContextConfiguration mergedConfig) Delegates to an appropriate candidateSmartContextLoaderto load anApplicationContextfor AOT processing.final cn.taketoday.context.support.GenericApplicationContextAbstractGenericContextLoader.loadContextForAotProcessing(MergedContextConfiguration mergedConfig) Load aGenericApplicationContextfor AOT build-time processing based on the suppliedMergedContextConfiguration.final cn.taketoday.context.ApplicationContextAbstractDelegatingSmartContextLoader.loadContextForAotRuntime(MergedContextConfiguration mergedConfig, cn.taketoday.context.ApplicationContextInitializer initializer) Delegates to an appropriate candidateSmartContextLoaderto load anApplicationContextfor AOT run-time execution.final cn.taketoday.context.support.GenericApplicationContextAbstractGenericContextLoader.loadContextForAotRuntime(MergedContextConfiguration mergedConfig, cn.taketoday.context.ApplicationContextInitializer initializer) Load aGenericApplicationContextfor AOT run-time execution based on the suppliedMergedContextConfigurationandApplicationContextInitializer.protected voidAbstractContextLoader.prepareContext(cn.taketoday.context.ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig) Prepare theConfigurableApplicationContextcreated by thisSmartContextLoaderbefore bean definitions are read.protected MergedContextConfigurationAbstractTestContextBootstrapper.processMergedContextConfiguration(MergedContextConfiguration mergedConfig) Process the supplied, newly instantiatedMergedContextConfigurationinstance.private booleanAbstractDelegatingSmartContextLoader.supports(SmartContextLoader loader, MergedContextConfiguration mergedConfig) protected voidAbstractGenericContextLoader.validateMergedContextConfiguration(MergedContextConfiguration mergedConfig) Validate the suppliedMergedContextConfigurationwith respect to what this context loader supports.protected voidAnnotationConfigContextLoader.validateMergedContextConfiguration(MergedContextConfiguration mergedConfig) Ensure that the suppliedMergedContextConfigurationdoes not containlocations.protected voidGenericPropertiesContextLoader.validateMergedContextConfiguration(MergedContextConfiguration mergedConfig) Ensure that the suppliedMergedContextConfigurationdoes not containclasses.protected voidGenericXmlContextLoader.validateMergedContextConfiguration(MergedContextConfiguration mergedConfig) Ensure that the suppliedMergedContextConfigurationdoes not containclasses.限定符构造器说明DefaultTestContext(Class<?> testClass, MergedContextConfiguration mergedConfig, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate) Construct a newDefaultTestContextfrom the supplied arguments. -
cn.taketoday.test.context.web中MergedContextConfiguration的使用
修饰符和类型类说明classWebMergedContextConfigurationencapsulates the merged context configuration declared on a test class and all of its superclasses via@ContextConfiguration,@WebAppConfiguration, and@ActiveProfiles.修饰符和类型方法说明protected MergedContextConfigurationWebTestContextBootstrapper.processMergedContextConfiguration(MergedContextConfiguration mergedConfig) Returns aWebMergedContextConfigurationif the test class in the suppliedMergedContextConfigurationis annotated with@WebAppConfigurationand otherwise returns the supplied instance unmodified.修饰符和类型方法说明final cn.taketoday.context.ApplicationContextAbstractGenericWebContextLoader.loadContext(MergedContextConfiguration mergedConfig) Load aGenericWebApplicationContextfor the suppliedMergedContextConfiguration.private final cn.taketoday.web.servlet.support.GenericWebApplicationContextAbstractGenericWebContextLoader.loadContext(MergedContextConfiguration mergedConfig, boolean forAotProcessing) Load aGenericWebApplicationContextfor the suppliedMergedContextConfiguration.final cn.taketoday.web.servlet.support.GenericWebApplicationContextAbstractGenericWebContextLoader.loadContextForAotProcessing(MergedContextConfiguration mergedConfig) Load aGenericWebApplicationContextfor AOT build-time processing based on the suppliedMergedContextConfiguration.final cn.taketoday.web.servlet.support.GenericWebApplicationContextAbstractGenericWebContextLoader.loadContextForAotRuntime(MergedContextConfiguration mergedConfig, cn.taketoday.context.ApplicationContextInitializer initializer) Load aGenericWebApplicationContextfor AOT run-time execution based on the suppliedMergedContextConfigurationandApplicationContextInitializer.protected MergedContextConfigurationWebTestContextBootstrapper.processMergedContextConfiguration(MergedContextConfiguration mergedConfig) Returns aWebMergedContextConfigurationif the test class in the suppliedMergedContextConfigurationis annotated with@WebAppConfigurationand otherwise returns the supplied instance unmodified.限定符构造器说明WebMergedContextConfiguration(MergedContextConfiguration mergedConfig, String resourceBasePath) Create a newWebMergedContextConfigurationinstance by copying all properties from the suppliedMergedContextConfiguration.WebMergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends cn.taketoday.context.ApplicationContextInitializer>> contextInitializerClasses, String[] activeProfiles, String[] propertySourceLocations, String[] propertySourceProperties, String resourceBasePath, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent) Create a newWebMergedContextConfigurationinstance for the supplied parameters.WebMergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends cn.taketoday.context.ApplicationContextInitializer>> contextInitializerClasses, String[] activeProfiles, String[] propertySourceLocations, String[] propertySourceProperties, Set<ContextCustomizer> contextCustomizers, String resourceBasePath, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent) Create a newWebMergedContextConfigurationinstance for the supplied parameters.WebMergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends cn.taketoday.context.ApplicationContextInitializer>> contextInitializerClasses, String[] activeProfiles, List<cn.taketoday.core.io.PropertySourceDescriptor> propertySourceDescriptors, String[] propertySourceProperties, Set<ContextCustomizer> contextCustomizers, String resourceBasePath, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent) Create a newWebMergedContextConfigurationinstance for the supplied parameters. -
cn.taketoday.test.context.web.socket中MergedContextConfiguration的使用
修饰符和类型方法说明voidMockServerContainerContextCustomizer.customizeContext(cn.taketoday.context.ConfigurableApplicationContext context, MergedContextConfiguration mergedConfig)