接口的使用
org.springframework.boot.ApplicationContextFactory
程序包
说明
Core Spring Boot classes.
Fluent 'builder' style API to construct a
SpringApplication.Classes and annotations related to configuring Spring's
ApplicationContext for
tests.-
org.springframework.boot中ApplicationContextFactory的使用
修饰符和类型字段说明static final ApplicationContextFactoryApplicationContextFactory.DEFAULTA defaultApplicationContextFactoryimplementation that will create an appropriate context for theWebApplicationType.修饰符和类型方法说明static ApplicationContextFactoryApplicationContextFactory.of(Supplier<ConfigurableApplicationContext> supplier) Creates anApplicationContextFactorythat will create contexts by calling the givenSupplier.static ApplicationContextFactoryApplicationContextFactory.ofContextClass(Class<? extends ConfigurableApplicationContext> contextClass) Creates anApplicationContextFactorythat will create contexts by instantiating the givencontextClassthrough its primary constructor.修饰符和类型方法说明voidSpringApplication.setApplicationContextFactory(ApplicationContextFactory applicationContextFactory) Sets the factory that will be called to create the application context. -
org.springframework.boot.builder中ApplicationContextFactory的使用
修饰符和类型方法说明SpringApplicationBuilder.contextFactory(ApplicationContextFactory factory) Explicitly set the factory used to create the application context. -
org.springframework.boot.test.context中ApplicationContextFactory的使用
修饰符和类型方法说明protected ApplicationContextFactorySpringBootContextLoader.getApplicationContextFactory(MergedContextConfiguration mergedConfig) Return theApplicationContextFactorythat should be used for the test.