类的使用
cn.taketoday.core.env.PropertySource
使用PropertySource的程序包
程序包
说明
environment abstraction consisting of bean definition
profile and hierarchical property source support.
-
cn.taketoday.core.env中PropertySource的使用
修饰符和类型类说明classAbstract base class forPropertySourceimplementations backed by command line arguments.classCompositePropertySourceimplementation that iterates over a set ofPropertySourceinstances.classAPropertySourceimplementation capable of interrogating its underlying source object to enumerate all possible property name/value pairs.classCommandLinePropertySourceimplementation backed by a JOptOptionSet.classPropertySourcethat reads keys and values from aMapobject.classSimplePropertySourceimplementation for use in testing.classMutable MapPropertySourceclassPropertySourceimplementation that extracts properties from aPropertiesobject.static classPropertySourceto be used as a placeholder in cases where an actual property source cannot be eagerly initialized at application context creation time.classCommandLinePropertySourceimplementation backed by a simple String array.classSpecialization ofMapPropertySourcedesigned for use with system environment variables.修饰符和类型方法说明Return the property source with the given name,nullif not found.static PropertySource<?>Return aPropertySourceimplementation intended for collection comparison purposes only.Remove and return the property source with the given name,nullif not found.返回变量类型为PropertySource的类型的cn.taketoday.core.env中的方法修饰符和类型方法说明CompositePropertySource.getPropertySources()Return all property sources that this composite source holds.PropertySources.iterator()PropertySources.spliterator()Stream<PropertySource<?>>PropertySources.stream()Return a sequentialStreamcontaining the property sources.参数类型为PropertySource的cn.taketoday.core.env中的方法修饰符和类型方法说明voidPropertySources.addAfter(String relativePropertySourceName, PropertySource<?> propertySource) Add the given property source object with precedence immediately lower than the named relative property source.voidPropertySources.addBefore(String relativePropertySourceName, PropertySource<?> propertySource) Add the given property source object with precedence immediately higher than the named relative property source.voidPropertySources.addFirst(PropertySource<?> propertySource) Add the given property source object with highest precedence.voidCompositePropertySource.addFirstPropertySource(PropertySource<?> propertySource) Add the givenPropertySourceto the start of the chain.voidPropertySources.addLast(PropertySource<?> propertySource) Add the given property source object with lowest precedence.voidCompositePropertySource.addPropertySource(PropertySource<?> propertySource) Add the givenPropertySourceto the end of the chain.protected voidPropertySources.assertLegalRelativeAddition(String relativePropertySourceName, PropertySource<?> propertySource) Ensure that the given property source is not being added relative to itself.protected voidPropertySourcesPropertyResolver.logKeyFound(String key, PropertySource<?> propertySource, Object value) Log the given key as found in the givenPropertySource, resulting in the given value.intPropertySources.precedenceOf(PropertySource<?> propertySource) Return the precedence of the given property source,-1if not found.protected voidPropertySources.removeIfPresent(PropertySource<?> propertySource) Remove the given property source if it is present.voidPropertySources.replace(String name, PropertySource<?> propertySource) Replace the property source with the given name with the given property source object. -
cn.taketoday.core.io中PropertySource的使用
修饰符和类型类说明classSubclass ofPropertiesPropertySourcethat loads aPropertiesobject from a givenResourceor resource location such as"classpath:/com/myco/foo.properties"or"file:/path/to/file.xml".修饰符和类型方法说明DefaultPropertySourceFactory.createPropertySource(String name, EncodedResource resource) PropertySourceFactory.createPropertySource(String name, EncodedResource resource) Create aPropertySourcethat wraps the given resource.