接口 WebServerApplicationContext
- 所有超级接口:
ApplicationContext
,ApplicationEventPublisher
,BeanFactory
,EnvironmentCapable
,HierarchicalBeanFactory
,ListableBeanFactory
,MessageSource
,ResourceLoader
,ResourcePatternResolver
- 所有已知实现类:
AnnotationConfigReactiveWebServerApplicationContext
,AnnotationConfigServletWebServerApplicationContext
,ReactiveWebServerApplicationContext
,ServletWebServerApplicationContext
,XmlServletWebServerApplicationContext
Interface to be implemented by
application contexts
that
create and manage the lifecycle of an embedded WebServer
.- 从以下版本开始:
- 2.0.0
- 作者:
- Phillip Webb
-
字段概要
从接口继承的字段 org.springframework.beans.factory.BeanFactory
FACTORY_BEAN_PREFIX, FACTORY_BEAN_PREFIX_CHAR
从接口继承的字段 org.springframework.core.io.ResourceLoader
CLASSPATH_URL_PREFIX
从接口继承的字段 org.springframework.core.io.support.ResourcePatternResolver
CLASSPATH_ALL_URL_PREFIX
-
方法概要
修饰符和类型方法说明Returns the namespace of the web server application context ornull
if no namespace has been set.static String
getServerNamespace
(ApplicationContext context) Returns the server namespace if the specified context is aWebServerApplicationContext
.Returns theWebServer
that was created by the context ornull
if the server has not yet been created.static boolean
hasServerNamespace
(ApplicationContext context, String serverNamespace) Returnstrue
if the specified context is aWebServerApplicationContext
with a matching server namespace.从接口继承的方法 org.springframework.context.ApplicationContext
getApplicationName, getAutowireCapableBeanFactory, getDisplayName, getId, getParent, getStartupDate
从接口继承的方法 org.springframework.context.ApplicationEventPublisher
publishEvent, publishEvent
从接口继承的方法 org.springframework.beans.factory.BeanFactory
containsBean, getAliases, getBean, getBean, getBean, getBean, getBean, getBeanProvider, getBeanProvider, getType, getType, isPrototype, isSingleton, isTypeMatch, isTypeMatch
从接口继承的方法 org.springframework.core.env.EnvironmentCapable
getEnvironment
从接口继承的方法 org.springframework.beans.factory.HierarchicalBeanFactory
containsLocalBean, getParentBeanFactory
从接口继承的方法 org.springframework.beans.factory.ListableBeanFactory
containsBeanDefinition, findAllAnnotationsOnBean, findAnnotationOnBean, findAnnotationOnBean, getBeanDefinitionCount, getBeanDefinitionNames, getBeanNamesForAnnotation, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeanNamesForType, getBeanProvider, getBeanProvider, getBeansOfType, getBeansOfType, getBeansWithAnnotation
从接口继承的方法 org.springframework.context.MessageSource
getMessage, getMessage, getMessage
从接口继承的方法 org.springframework.core.io.ResourceLoader
getClassLoader, getResource
从接口继承的方法 org.springframework.core.io.support.ResourcePatternResolver
getResources
-
方法详细资料
-
getWebServer
WebServer getWebServer()Returns theWebServer
that was created by the context ornull
if the server has not yet been created.- 返回:
- the web server
-
getServerNamespace
String getServerNamespace()Returns the namespace of the web server application context ornull
if no namespace has been set. Used for disambiguation when multiple web servers are running in the same application (for example a management context running on a different port).- 返回:
- the server namespace
-
hasServerNamespace
Returnstrue
if the specified context is aWebServerApplicationContext
with a matching server namespace.- 参数:
context
- the context to checkserverNamespace
- the server namespace to match against- 返回:
true
if the server namespace of the context matches- 从以下版本开始:
- 2.1.8
-
getServerNamespace
Returns the server namespace if the specified context is aWebServerApplicationContext
.- 参数:
context
- the context- 返回:
- the server namespace or
null
if the context is not aWebServerApplicationContext
- 从以下版本开始:
- 2.6.0
-