接口的使用
org.springframework.context.ApplicationContextInitializer
使用ApplicationContextInitializer的程序包 程序包 说明 org.springframework.test.context This package contains the Spring TestContext Framework which provides annotation-driven unit and integration testing support that is agnostic of the actual testing framework in use.org.springframework.test.context.junit.jupiter Core support for integrating the Spring TestContext Framework with the JUnit Jupiter extension model in JUnit 5.org.springframework.test.context.junit.jupiter.web Web support for integrating the Spring TestContext Framework with the JUnit Jupiter extension model in JUnit 5.org.springframework.test.context.web Web support classes for the Spring TestContext Framework.org.springframework.web.context Contains a variant of the application context interface for web applications, and the ContextLoaderListener that bootstraps a root web application context.org.springframework.web.servlet Provides servlets that integrate with the application context infrastructure, and the core interfaces and classes for the Spring web MVC framework.org.springframework.web.servlet.support Support classes for Spring's web MVC framework.org.springframework.test.context中ApplicationContextInitializer的使用
返回变量类型为ApplicationContextInitializer的类型的org.springframework.test.context中的方法 修饰符和类型 方法 说明 Set<Class<? extends ApplicationContextInitializer<?>>>
MergedContextConfiguration. getContextInitializerClasses()
Get the mergedApplicationContextInitializer
classes for the test class.Class<? extends ApplicationContextInitializer<?>>[]
ContextConfigurationAttributes. getInitializers()
Get theApplicationContextInitializer
classes that were declared via@ContextConfiguration
.Class<? extends ApplicationContextInitializer<?>>[]
initializers()
The application context initializer classes to use for initializing aConfigurableApplicationContext
.类型变量类型为ApplicationContextInitializer的org.springframework.test.context中的构造器参数 构造器 说明 MergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, String[] activeProfiles, String[] propertySourceLocations, String[] propertySourceProperties, Set<ContextCustomizer> contextCustomizers, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent)
Create a newMergedContextConfiguration
instance for the supplied parameters.MergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, String[] activeProfiles, String[] propertySourceLocations, String[] propertySourceProperties, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent)
Create a newMergedContextConfiguration
instance for the supplied parameters.MergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, String[] activeProfiles, ContextLoader contextLoader)
Create a newMergedContextConfiguration
instance for the supplied parameters.MergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, String[] activeProfiles, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent)
Create a newMergedContextConfiguration
instance for the supplied parameters.org.springframework.test.context.junit.jupiter中ApplicationContextInitializer的使用
返回变量类型为ApplicationContextInitializer的类型的org.springframework.test.context.junit.jupiter中的方法 修饰符和类型 方法 说明 Class<? extends ApplicationContextInitializer<?>>[]
initializers()
Alias forContextConfiguration.initializers()
.org.springframework.test.context.junit.jupiter.web中ApplicationContextInitializer的使用
返回变量类型为ApplicationContextInitializer的类型的org.springframework.test.context.junit.jupiter.web中的方法 修饰符和类型 方法 说明 Class<? extends ApplicationContextInitializer<?>>[]
initializers()
Alias forContextConfiguration.initializers()
.org.springframework.test.context.web中ApplicationContextInitializer的使用
类型变量类型为ApplicationContextInitializer的org.springframework.test.context.web中的构造器参数 构造器 说明 WebMergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, String[] activeProfiles, String[] propertySourceLocations, String[] propertySourceProperties, String resourceBasePath, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent)
Create a newWebMergedContextConfiguration
instance for the supplied parameters.WebMergedContextConfiguration(Class<?> testClass, String[] locations, Class<?>[] classes, Set<Class<? extends ApplicationContextInitializer<?>>> contextInitializerClasses, String[] activeProfiles, String[] propertySourceLocations, String[] propertySourceProperties, Set<ContextCustomizer> contextCustomizers, String resourceBasePath, ContextLoader contextLoader, CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate, MergedContextConfiguration parent)
Create a newWebMergedContextConfiguration
instance for the supplied parameters.org.springframework.web.context中ApplicationContextInitializer的使用
返回ApplicationContextInitializer的org.springframework.web.context中的方法 修饰符和类型 方法 说明 protected ApplicationContextInitializer<?>[]
AbstractContextLoaderInitializer. getRootApplicationContextInitializers()
Specify application context initializers to be applied to the root application context that theContextLoaderListener
is being created with.返回变量类型为ApplicationContextInitializer的类型的org.springframework.web.context中的方法 修饰符和类型 方法 说明 protected List<Class<ApplicationContextInitializer<ConfigurableApplicationContext>>>
ContextLoader. determineContextInitializerClasses(ServletContext servletContext)
Return theApplicationContextInitializer
implementation classes to use if any have been specified byContextLoader.CONTEXT_INITIALIZER_CLASSES_PARAM
.参数类型为ApplicationContextInitializer的org.springframework.web.context中的方法 修饰符和类型 方法 说明 void
ContextLoader. setContextInitializers(ApplicationContextInitializer<?>... initializers)
Specify whichApplicationContextInitializer
instances should be used to initialize the application context used by thisContextLoader
.org.springframework.web.servlet中ApplicationContextInitializer的使用
参数类型为ApplicationContextInitializer的org.springframework.web.servlet中的方法 修饰符和类型 方法 说明 void
FrameworkServlet. setContextInitializers(ApplicationContextInitializer<?>... initializers)
Specify whichApplicationContextInitializer
instances should be used to initialize the application context used by thisFrameworkServlet
.org.springframework.web.servlet.support中ApplicationContextInitializer的使用
返回ApplicationContextInitializer的org.springframework.web.servlet.support中的方法 修饰符和类型 方法 说明 protected ApplicationContextInitializer<?>[]
AbstractDispatcherServletInitializer. getServletApplicationContextInitializers()
Specify application context initializers to be applied to the servlet-specific application context that theDispatcherServlet
is being created with.