接口的使用
org.springframework.core.env.ConfigurableEnvironment
使用ConfigurableEnvironment的程序包 程序包 说明 org.springframework.context This package builds on the beans package to add support for message sources and for the Observer design pattern, and the ability for application objects to obtain resources using a consistent API.org.springframework.context.annotation Annotation support for the Application Context, including JSR-250 "common" annotations, component-scanning, and Java-based metadata for creating Spring-managed objects.org.springframework.context.support Classes supporting the org.springframework.context package, such as abstract base classes for ApplicationContext implementations and a MessageSource implementation.org.springframework.core.env Spring's environment abstraction consisting of bean definition profile and hierarchical property source support.org.springframework.jca.context Integration package that allows for deploying a Spring application context as a JCA 1.7 compliant RAR file.org.springframework.mock.env This package contains mock implementations of theEnvironment
andPropertySource
abstractions introduced in Spring 3.1.org.springframework.test.context.support 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.context.support Classes supporting theorg.springframework.web.context
package, such as WebApplicationContext implementations and various utility classes.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.context中ConfigurableEnvironment的使用
返回ConfigurableEnvironment的org.springframework.context中的方法 修饰符和类型 方法 说明 ConfigurableEnvironment
ConfigurableApplicationContext. getEnvironment()
Return theEnvironment
for this application context in configurable form, allowing for further customization.参数类型为ConfigurableEnvironment的org.springframework.context中的方法 修饰符和类型 方法 说明 void
ConfigurableApplicationContext. setEnvironment(ConfigurableEnvironment environment)
Set theEnvironment
for this application context.org.springframework.context.annotation中ConfigurableEnvironment的使用
参数类型为ConfigurableEnvironment的org.springframework.context.annotation中的方法 修饰符和类型 方法 说明 void
AnnotationConfigApplicationContext. setEnvironment(ConfigurableEnvironment environment)
Propagate the given customEnvironment
to the underlyingAnnotatedBeanDefinitionReader
andClassPathBeanDefinitionScanner
.org.springframework.context.support中ConfigurableEnvironment的使用
返回ConfigurableEnvironment的org.springframework.context.support中的方法 修饰符和类型 方法 说明 protected ConfigurableEnvironment
AbstractApplicationContext. createEnvironment()
Create and return a newStandardEnvironment
.ConfigurableEnvironment
AbstractApplicationContext. getEnvironment()
Return theEnvironment
for this application context in configurable form, allowing for further customization.参数类型为ConfigurableEnvironment的org.springframework.context.support中的方法 修饰符和类型 方法 说明 void
AbstractApplicationContext. setEnvironment(ConfigurableEnvironment environment)
Set theEnvironment
for this application context.void
GenericGroovyApplicationContext. setEnvironment(ConfigurableEnvironment environment)
Delegates the given environment to underlyingGroovyBeanDefinitionReader
.void
GenericXmlApplicationContext. setEnvironment(ConfigurableEnvironment environment)
Delegates the given environment to underlyingXmlBeanDefinitionReader
.org.springframework.core.env中ConfigurableEnvironment的使用
实现ConfigurableEnvironment的org.springframework.core.env中的类 修饰符和类型 类 说明 class
AbstractEnvironment
Abstract base class forEnvironment
implementations.class
StandardEnvironment
Environment
implementation suitable for use in 'standard' (i.e. non-web) applications.参数类型为ConfigurableEnvironment的org.springframework.core.env中的方法 修饰符和类型 方法 说明 void
AbstractEnvironment. merge(ConfigurableEnvironment parent)
void
ConfigurableEnvironment. merge(ConfigurableEnvironment parent)
Append the given parent environment's active profiles, default profiles and property sources to this (child) environment's respective collections of each.org.springframework.jca.context中ConfigurableEnvironment的使用
返回ConfigurableEnvironment的org.springframework.jca.context中的方法 修饰符和类型 方法 说明 protected ConfigurableEnvironment
SpringContextResourceAdapter. createEnvironment()
Return a newStandardEnvironment
.org.springframework.mock.env中ConfigurableEnvironment的使用
实现ConfigurableEnvironment的org.springframework.mock.env中的类 修饰符和类型 类 说明 class
MockEnvironment
SimpleConfigurableEnvironment
implementation exposingMockEnvironment.setProperty(String, String)
andMockEnvironment.withProperty(String, String)
methods for testing purposes.org.springframework.test.context.support中ConfigurableEnvironment的使用
参数类型为ConfigurableEnvironment的org.springframework.test.context.support中的方法 修饰符和类型 方法 说明 static void
TestPropertySourceUtils. addInlinedPropertiesToEnvironment(ConfigurableEnvironment environment, String... inlinedProperties)
Add the given inlined properties (in the form of key-value pairs) to the suppliedenvironment
.static void
TestPropertySourceUtils. addPropertiesFilesToEnvironment(ConfigurableEnvironment environment, ResourceLoader resourceLoader, String... locations)
org.springframework.web.context中ConfigurableEnvironment的使用
org.springframework.web.context中ConfigurableEnvironment的子接口 修饰符和类型 接口 说明 interface
ConfigurableWebEnvironment
Specialization ofConfigurableEnvironment
allowing initialization of servlet-relatedPropertySource
objects at the earliest moment that theServletContext
and (optionally)ServletConfig
become available.org.springframework.web.context.support中ConfigurableEnvironment的使用
实现ConfigurableEnvironment的org.springframework.web.context.support中的类 修饰符和类型 类 说明 class
StandardServletEnvironment
Environment
implementation to be used byServlet
-based web applications.返回ConfigurableEnvironment的org.springframework.web.context.support中的方法 修饰符和类型 方法 说明 protected ConfigurableEnvironment
AbstractRefreshableWebApplicationContext. createEnvironment()
Create and return a newStandardServletEnvironment
.protected ConfigurableEnvironment
GenericWebApplicationContext. createEnvironment()
Create and return a newStandardServletEnvironment
.protected ConfigurableEnvironment
StaticWebApplicationContext. createEnvironment()
Create and return a newStandardServletEnvironment
.org.springframework.web.servlet中ConfigurableEnvironment的使用
返回ConfigurableEnvironment的org.springframework.web.servlet中的方法 修饰符和类型 方法 说明 protected ConfigurableEnvironment
HttpServletBean. createEnvironment()
Create and return a newStandardServletEnvironment
.ConfigurableEnvironment
HttpServletBean. getEnvironment()
Return theEnvironment
associated with this servlet.