Package io.smallrye.config.source.file
Class FileSystemConfigSource
java.lang.Object
io.smallrye.config.common.AbstractConfigSource
io.smallrye.config.common.MapBackedConfigSource
io.smallrye.config.source.file.FileSystemConfigSource
- All Implemented Interfaces:
Serializable,org.eclipse.microprofile.config.spi.ConfigSource
Read configuration from a file directory.
Each file in the directory corresponds to a property where the file name is the property key and the file textual content is the property value.
For example, if a directory structure looks like:
foo/
├── num.max
└── num.size
new FileSystemConfigSource(new File("foo"), 100) will provide 2 properties:
num.maxnum.size
Nested directories are not supported.
- Author:
- Jeff Mesnil (c) 2017 Red Hat inc.
- See Also:
-
Field Summary
Fields inherited from interface org.eclipse.microprofile.config.spi.ConfigSource
CONFIG_ORDINAL, DEFAULT_ORDINAL -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class io.smallrye.config.common.MapBackedConfigSource
getProperties, getPropertyNamesMethods inherited from class io.smallrye.config.common.AbstractConfigSource
getName, getOrdinal, toString
-
Constructor Details
-
FileSystemConfigSource
-
FileSystemConfigSource
-
FileSystemConfigSource
Construct a new instance- Parameters:
dir- the directory, containing configuration filesordinal- the ordinal value
-
-
Method Details
-
getValue
- Specified by:
getValuein interfaceorg.eclipse.microprofile.config.spi.ConfigSource- Overrides:
getValuein classMapBackedConfigSource
-