public class AnnotationConfigReactiveWebApplicationContext extends AnnotationConfigApplicationContext implements ConfigurableReactiveWebApplicationContext
ConfigurableReactiveWebApplicationContext - 特に @Configuration アノテーション付きクラスだけでなく、プレーンな @Component クラスと javax.inject アノテーションを使用する JSR-330 準拠クラスも受け入れます。クラスを 1 つずつ登録する (構成場所としてクラス名を指定する) こと、およびクラスパススキャン (基本パッケージを構成場所として指定する) を可能にします。 メモ: 複数の @Configuration クラスの場合、後の @Bean 定義は、以前にロードされたファイルで定義されたものをオーバーライドします。これを活用して、追加の構成クラスを介して特定の Bean 定義を意図的にオーバーライドできます。
AnnotationConfigApplicationContextDefaultResourceLoader.ClassPathContextResourceAPPLICATION_EVENT_MULTICASTER_BEAN_NAME, LIFECYCLE_PROCESSOR_BEAN_NAME, logger, MESSAGE_SOURCE_BEAN_NAMECONFIG_LOCATION_DELIMITERS, CONVERSION_SERVICE_BEAN_NAME, ENVIRONMENT_BEAN_NAME, LOAD_TIME_WEAVER_BEAN_NAME, SHUTDOWN_HOOK_THREAD_NAME, SYSTEM_ENVIRONMENT_BEAN_NAME, SYSTEM_PROPERTIES_BEAN_NAMEFACTORY_BEAN_PREFIXCLASSPATH_ALL_URL_PREFIXCLASSPATH_URL_PREFIX| コンストラクターと説明 |
|---|
AnnotationConfigReactiveWebApplicationContext() 新しい AnnotationConfigReactiveWebApplicationContext を作成します。この AnnotationConfigReactiveWebApplicationContext は、 AnnotationConfigApplicationContext.register(java.lang.Class<?>...) 呼び出しを通じて設定し、手動でリフレッシュする必要があります。 |
AnnotationConfigReactiveWebApplicationContext(ClassSE<?>... annotatedClasses) 新しい AnnotationConfigApplicationContext を作成し、指定されたアノテーション付きクラスから Bean 定義を派生させ、コンテキストを自動的にリフレッシュします。 |
AnnotationConfigReactiveWebApplicationContext(DefaultListableBeanFactory beanFactory) 指定された DefaultListableBeanFactory で新しい AnnotationConfigApplicationContext を作成します。 |
AnnotationConfigReactiveWebApplicationContext(StringSE... basePackages) 新しい AnnotationConfigApplicationContext を作成し、指定されたパッケージの Bean 定義をスキャンして、コンテキストを自動的にリフレッシュします。 |
| 修飾子と型 | メソッドと説明 |
|---|---|
protected DefaultListableBeanFactory | createBeanFactory() 使用すべきではありません。 2.2.0 以降、このクラスは AbstractRefreshableConfigApplicationContext を継承しなくなったため。 |
protected ConfigurableEnvironment | createEnvironment() |
protected void | customizeBeanFactory(DefaultListableBeanFactory beanFactory) 使用すべきではありません。 2.2.0 以降、このクラスは AbstractRefreshableConfigApplicationContext を継承しなくなったため。 |
protected AnnotatedBeanDefinitionReader | getAnnotatedBeanDefinitionReader(DefaultListableBeanFactory beanFactory) 使用すべきではありません。 このクラスは AbstractRefreshableConfigApplicationContext を継承しなくなったため、2.2.0 以降 |
protected BeanNameGenerator | getBeanNameGenerator() 使用すべきではありません。 このクラスは AbstractRefreshableConfigApplicationContext を継承しなくなったため、2.2.0 以降 |
protected ClassPathBeanDefinitionScanner | getClassPathBeanDefinitionScanner(DefaultListableBeanFactory beanFactory) 使用すべきではありません。 このクラスは AbstractRefreshableConfigApplicationContext を継承しなくなったため、2.2.0 以降 |
protected StringSE[] | getConfigLocations() 使用すべきではありません。 2.2.0 以降、このクラスは AbstractRefreshableConfigApplicationContext を継承しなくなったため。 |
protected StringSE[] | getDefaultConfigLocations() 使用すべきではありません。 2.2.0 以降、このクラスは AbstractRefreshableConfigApplicationContext を継承しなくなったため。 |
protected Resource | getResourceByPath(StringSE path) |
protected ScopeMetadataResolver | getScopeMetadataResolver() 使用すべきではありません。 このクラスは AbstractRefreshableConfigApplicationContext を継承しなくなったため、2.2.0 以降 |
protected boolean | hasBeanFactory() 使用すべきではありません。 2.2.0 以降、このクラスは AbstractRefreshableConfigApplicationContext を継承しなくなったため。 |
protected void | loadBeanDefinitions(DefaultListableBeanFactory beanFactory) 使用すべきではありません。 このクラスは AbstractRefreshableConfigApplicationContext を継承しなくなったため、2.2.0 以降 |
protected StringSE | resolvePath(StringSE path) 使用すべきではありません。 2.2.0 以降、このクラスは AbstractRefreshableConfigApplicationContext を継承しなくなったため。 |
void | setConfigLocation(StringSE location) 使用すべきではありません。 2.2.0 以降、このクラスは AbstractRefreshableConfigApplicationContext を継承しなくなったため、代わりに @ImportResource を使用してください。 |
void | setConfigLocations(StringSE... locations) 使用すべきではありません。 2.2.0 以降、このクラスは AbstractRefreshableConfigApplicationContext を継承しなくなったため、代わりに @ImportResource を使用してください。 |
register, registerBean, scan, setBeanNameGenerator, setEnvironment, setScopeMetadataResolvercancelRefresh, closeBeanFactory, getAutowireCapableBeanFactory, getBeanDefinition, getBeanFactory, getClassLoader, getDefaultListableBeanFactory, getResource, getResources, isAlias, isBeanNameInUse, refreshBeanFactory, registerAlias, registerBean, registerBean, registerBean, registerBean, registerBean, registerBeanDefinition, removeAlias, removeBeanDefinition, setAllowBeanDefinitionOverriding, setAllowCircularReferences, setClassLoader, setParent, setResourceLoaderaddApplicationListener, addBeanFactoryPostProcessor, assertBeanFactoryActive, close, containsBean, containsBeanDefinition, containsLocalBean, destroy, destroyBeans, doClose, findAnnotationOnBean, finishBeanFactoryInitialization, finishRefresh, getAliases, getApplicationListeners, getApplicationName, getBean, getBean, getBean, getBean, getBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanFactoryPostProcessors, getBeanNamesForAnnotation, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeanProvider, getBeanProvider, getBeansOfType, getBeansOfType, getBeansWithAnnotation, getDisplayName, getEnvironment, getId, getInternalParentBeanFactory, getInternalParentMessageSource, getMessage, getMessage, getMessage, getParent, getParentBeanFactory, getResourcePatternResolver, getStartupDate, getType, getType, initApplicationEventMulticaster, initLifecycleProcessor, initMessageSource, initPropertySources, invokeBeanFactoryPostProcessors, isActive, isPrototype, isRunning, isSingleton, isTypeMatch, isTypeMatch, obtainFreshBeanFactory, onClose, onRefresh, postProcessBeanFactory, prepareBeanFactory, prepareRefresh, publishEvent, publishEvent, publishEvent, refresh, registerBeanPostProcessors, registerListeners, registerShutdownHook, resetCommonCaches, setDisplayName, setId, start, stop, toStringaddProtocolResolver, clearResourceCaches, getProtocolResolvers, getResourceCachecloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, waitSE, waitSE, waitSEaddApplicationListener, addBeanFactoryPostProcessor, addProtocolResolver, close, getBeanFactory, getEnvironment, isActive, refresh, registerShutdownHook, setEnvironment, setId, setParentgetApplicationName, getAutowireCapableBeanFactory, getDisplayName, getId, getParent, getStartupDatecontainsBeanDefinition, findAnnotationOnBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanNamesForAnnotation, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeansOfType, getBeansOfType, getBeansWithAnnotationcontainsLocalBean, getParentBeanFactorycontainsBean, getAliases, getBean, getBean, getBean, getBean, getBean, getBeanProvider, getBeanProvider, getType, getType, isPrototype, isSingleton, isTypeMatch, isTypeMatchgetMessage, getMessage, getMessagepublishEvent, publishEventgetResourcesgetClassLoader, getResourcecontainsBeanDefinition, getBeanDefinitionCount, getBeanDefinitionNamesgetAliasespublic AnnotationConfigReactiveWebApplicationContext()
AnnotationConfigApplicationContext.register(java.lang.Class<?>...) 呼び出しを通じて設定し、手動でリフレッシュする必要があります。public AnnotationConfigReactiveWebApplicationContext(DefaultListableBeanFactory beanFactory)
beanFactory - このコンテキストに使用する DefaultListableBeanFactory インスタンス public AnnotationConfigReactiveWebApplicationContext(ClassSE<?>... annotatedClasses)
annotatedClasses - 1 つまたは複数のアノテーション付きクラス、たとえば @Configuration クラス public AnnotationConfigReactiveWebApplicationContext(StringSE... basePackages)
basePackages - アノテーション付きクラスを確認するパッケージ protected ConfigurableEnvironment createEnvironment()
AbstractApplicationContext の createEnvironment protected Resource getResourceByPath(StringSE path)
DefaultResourceLoader の getResourceByPath @DeprecatedSE protected final BeanNameGenerator getBeanNameGenerator()
AbstractRefreshableConfigApplicationContext を継承しなくなったため AnnotatedBeanDefinitionReader および / または ClassPathBeanDefinitionScanner で使用するカスタム BeanNameGenerator を返します(ある場合)。@DeprecatedSE protected ScopeMetadataResolver getScopeMetadataResolver()
AbstractRefreshableConfigApplicationContext を継承しなくなったため AnnotatedBeanDefinitionReader および / または ClassPathBeanDefinitionScanner で使用するカスタム ScopeMetadataResolver を返します(ある場合)。@DeprecatedSE protected void loadBeanDefinitions(DefaultListableBeanFactory beanFactory)
AbstractRefreshableConfigApplicationContext を継承しなくなったため AnnotationConfigApplicationContext.register(Class...) で指定されたクラスの BeanDefinition を登録し、AnnotationConfigApplicationContext.scan(String...) で指定されたパッケージをスキャンします。setConfigLocation(String) または setConfigLocations(String[]) で指定された値の場合、クラスのロードが成功した場合はクラスごとに各ロケーションをロードし、BeanDefinition を登録し、クラスのロードが失敗した場合(つまり ClassNotFoundException が発生した場合)、値がパッケージであると想定し、アノテーション付きのクラスをスキャンします。
@Autowired、@Required、関連するアノテーションを使用できるように、アノテーション構成ポストプロセッサーのデフォルトセットを有効にします。
value 属性がステレオタイプアノテーションに提供されない限り、構成クラス Bean 定義は、生成された Bean 定義名で登録されます。
beanFactory - Bean 定義をロードする Bean ファクトリ AnnotationConfigApplicationContext.register(Class...), AnnotationConfigApplicationContext.scan(String...), setConfigLocation(String), setConfigLocations(String[]), AnnotatedBeanDefinitionReader, ClassPathBeanDefinitionScanner@DeprecatedSE protected AnnotatedBeanDefinitionReader getAnnotatedBeanDefinitionReader(DefaultListableBeanFactory beanFactory)
AbstractRefreshableConfigApplicationContext を継承しなくなったため AnnotatedBeanDefinitionReader を構築します。 これは、Environment (必要な場合)で事前に構成する必要がありますが、BeanNameGenerator または ScopeMetadataResolver ではまだ構成しないでください。
beanFactory - Bean 定義をロードする Bean ファクトリ AbstractApplicationContext.getEnvironment(), getBeanNameGenerator(), getScopeMetadataResolver()@DeprecatedSE protected ClassPathBeanDefinitionScanner getClassPathBeanDefinitionScanner(DefaultListableBeanFactory beanFactory)
AbstractRefreshableConfigApplicationContext を継承しなくなったため ClassPathBeanDefinitionScanner を構築します。 これは、Environment (必要な場合)で事前に構成する必要がありますが、BeanNameGenerator または ScopeMetadataResolver ではまだ構成しないでください。
beanFactory - Bean 定義をロードする Bean ファクトリ AbstractApplicationContext.getEnvironment(), getBeanNameGenerator(), getScopeMetadataResolver()@DeprecatedSE public void setConfigLocation(StringSE location)
AbstractRefreshableConfigApplicationContext を継承しなくなりました。代わりに @ImportResource を使用してください。設定しない場合、実装は必要に応じてデフォルトを使用できます。
location - 構成の場所 @DeprecatedSE public void setConfigLocations(@Nullable StringSE... locations)
AbstractRefreshableConfigApplicationContext を継承しなくなりました。代わりに @ImportResource を使用してください。設定しない場合、実装は必要に応じてデフォルトを使用できます。
locations - 構成の場所 @DeprecatedSE protected StringSE[] getConfigLocations()
AbstractRefreshableConfigApplicationContext を継承しなくなったためです。 デフォルトの実装は null を返します。サブクラスはこれをオーバーライドして、Bean 定義をロードするためのリソースロケーションのセットを提供できます。
null GenericApplicationContext.getResources(java.lang.String), AbstractApplicationContext.getResourcePatternResolver()@DeprecatedSE protected StringSE[] getDefaultConfigLocations()
AbstractRefreshableConfigApplicationContext を継承しなくなったためです。 デフォルトの実装は null を返し、明示的な構成場所が必要です。
setConfigLocations(java.lang.String...)@DeprecatedSE protected StringSE resolvePath(StringSE path)
AbstractRefreshableConfigApplicationContext を継承しなくなったためです。path - 元のファイルパス PropertyResolver.resolveRequiredPlaceholders(String)@DeprecatedSE protected final boolean hasBeanFactory()
AbstractRefreshableConfigApplicationContext を継承しなくなったためです。true @DeprecatedSE protected DefaultListableBeanFactory createBeanFactory()
AbstractRefreshableConfigApplicationContext を継承しなくなったためです。AbstractApplicationContext.refresh() の試行ごとに呼び出されます。 デフォルトの実装では、このコンテキストの親の内部 Bean ファクトリを親 Bean ファクトリとして使用して DefaultListableBeanFactory を作成します。DefaultListableBeanFactory の設定をカスタマイズするなど、サブクラスでオーバーライドできます。
DefaultListableBeanFactory.setAllowBeanDefinitionOverriding(boolean), DefaultListableBeanFactory.setAllowEagerClassLoading(boolean), AbstractAutowireCapableBeanFactory.setAllowCircularReferences(boolean), AbstractAutowireCapableBeanFactory.setAllowRawInjectionDespiteWrapping(boolean)@DeprecatedSE protected void customizeBeanFactory(DefaultListableBeanFactory beanFactory)
AbstractRefreshableConfigApplicationContext を継承しなくなったためです。AbstractApplicationContext.refresh() の試行ごとに呼び出されます。 デフォルトの実装は、指定されている場合、このコンテキストの "allowBeanDefinitionOverriding" および "allowCircularReferences" 設定を適用します。DefaultListableBeanFactory の設定をカスタマイズするためにサブクラスでオーバーライドできます。
beanFactory - このコンテキスト用に新しく作成された Bean ファクトリ DefaultListableBeanFactory.setAllowBeanDefinitionOverriding(boolean), AbstractAutowireCapableBeanFactory.setAllowCircularReferences(boolean), AbstractAutowireCapableBeanFactory.setAllowRawInjectionDespiteWrapping(boolean), DefaultListableBeanFactory.setAllowEagerClassLoading(boolean)Copyright © 2020 Pivotal Software, Inc.. All rights reserved.