接口的使用
org.springframework.core.env.Environment
使用Environment的程序包 程序包 说明 org.springframework.beans.factory.support Classes supporting theorg.springframework.beans.factory
package.org.springframework.beans.factory.xml Contains an abstract XML-basedBeanFactory
implementation, including a standard "spring-beans" XSD.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.mock.env This package contains mock implementations of theEnvironment
andPropertySource
abstractions introduced in Spring 3.1.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.filter Provides generic filter base classes allowing for bean-style configuration.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.beans.factory.support中Environment的使用
返回Environment的org.springframework.beans.factory.support中的方法 修饰符和类型 方法 说明 Environment
AbstractBeanDefinitionReader. getEnvironment()
参数类型为Environment的org.springframework.beans.factory.support中的方法 修饰符和类型 方法 说明 void
AbstractBeanDefinitionReader. setEnvironment(Environment environment)
Set the Environment to use when reading bean definitions.org.springframework.beans.factory.xml中Environment的使用
返回Environment的org.springframework.beans.factory.xml中的方法 修饰符和类型 方法 说明 Environment
XmlReaderContext. getEnvironment()
Return the environment to use.org.springframework.context中Environment的使用
参数类型为Environment的org.springframework.context中的方法 修饰符和类型 方法 说明 void
EnvironmentAware. setEnvironment(Environment environment)
Set theEnvironment
that this component runs in.org.springframework.context.annotation中Environment的使用
返回Environment的org.springframework.context.annotation中的方法 修饰符和类型 方法 说明 Environment
ClassPathScanningCandidateComponentProvider. getEnvironment()
Environment
ConditionContext. getEnvironment()
Return theEnvironment
for which the current application is running.参数类型为Environment的org.springframework.context.annotation中的方法 修饰符和类型 方法 说明 void
AnnotatedBeanDefinitionReader. setEnvironment(Environment environment)
Set theEnvironment
to use when evaluating whether@Conditional
-annotated component classes should be registered.void
ClassPathScanningCandidateComponentProvider. setEnvironment(Environment environment)
Set the Environment to use when resolving placeholders and evaluating@Conditional
-annotated component classes.void
ConfigurationClassPostProcessor. setEnvironment(Environment environment)
void
MBeanExportConfiguration. setEnvironment(Environment environment)
参数类型为Environment的org.springframework.context.annotation中的构造器 构造器 说明 AnnotatedBeanDefinitionReader(BeanDefinitionRegistry registry, Environment environment)
Create a newAnnotatedBeanDefinitionReader
for the given registry, using the givenEnvironment
.ClassPathBeanDefinitionScanner(BeanDefinitionRegistry registry, boolean useDefaultFilters, Environment environment)
Create a newClassPathBeanDefinitionScanner
for the given bean factory and using the givenEnvironment
when evaluating bean definition profile metadata.ClassPathBeanDefinitionScanner(BeanDefinitionRegistry registry, boolean useDefaultFilters, Environment environment, ResourceLoader resourceLoader)
Create a newClassPathBeanDefinitionScanner
for the given bean factory and using the givenEnvironment
when evaluating bean definition profile metadata.ClassPathScanningCandidateComponentProvider(boolean useDefaultFilters, Environment environment)
Create a ClassPathScanningCandidateComponentProvider with the givenEnvironment
.org.springframework.context.support中Environment的使用
参数类型为Environment的org.springframework.context.support中的方法 修饰符和类型 方法 说明 void
PropertySourcesPlaceholderConfigurer. setEnvironment(Environment environment)
PropertySources
from the givenEnvironment
will be searched when replacing ${...} placeholders.org.springframework.core.env中Environment的使用
org.springframework.core.env中Environment的子接口 修饰符和类型 接口 说明 interface
ConfigurableEnvironment
Configuration interface to be implemented by most if not allEnvironment
types.实现Environment的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.返回Environment的org.springframework.core.env中的方法 修饰符和类型 方法 说明 Environment
EnvironmentCapable. getEnvironment()
Return theEnvironment
associated with this component.org.springframework.mock.env中Environment的使用
实现Environment的org.springframework.mock.env中的类 修饰符和类型 类 说明 class
MockEnvironment
SimpleConfigurableEnvironment
implementation exposingMockEnvironment.setProperty(String, String)
andMockEnvironment.withProperty(String, String)
methods for testing purposes.org.springframework.web.context中Environment的使用
org.springframework.web.context中Environment的子接口 修饰符和类型 接口 说明 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中Environment的使用
实现Environment的org.springframework.web.context.support中的类 修饰符和类型 类 说明 class
StandardServletEnvironment
Environment
implementation to be used byServlet
-based web applications.org.springframework.web.filter中Environment的使用
返回Environment的org.springframework.web.filter中的方法 修饰符和类型 方法 说明 protected Environment
GenericFilterBean. createEnvironment()
Create and return a newStandardServletEnvironment
.Environment
GenericFilterBean. getEnvironment()
Return theEnvironment
associated with this filter.参数类型为Environment的org.springframework.web.filter中的方法 修饰符和类型 方法 说明 void
GenericFilterBean. setEnvironment(Environment environment)
Set theEnvironment
that this filter runs in.org.springframework.web.servlet中Environment的使用
参数类型为Environment的org.springframework.web.servlet中的方法 修饰符和类型 方法 说明 void
HttpServletBean. setEnvironment(Environment environment)
Set theEnvironment
that this servlet runs in.