接口 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 ornullif no namespace has been set.static StringgetServerNamespace(ApplicationContext context) Returns the server namespace if the specified context is aWebServerApplicationContext.Returns theWebServerthat was created by the context ornullif the server has not yet been created.static booleanhasServerNamespace(ApplicationContext context, String serverNamespace) Returnstrueif the specified context is aWebServerApplicationContextwith 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 theWebServerthat was created by the context ornullif the server has not yet been created.- 返回:
- the web server
-
getServerNamespace
String getServerNamespace()Returns the namespace of the web server application context ornullif 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
Returnstrueif the specified context is aWebServerApplicationContextwith a matching server namespace.- 参数:
context- the context to checkserverNamespace- the server namespace to match against- 返回:
trueif 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
nullif the context is not aWebServerApplicationContext - 从以下版本开始:
- 2.6.0
-