Package net.obvj.confectory.source
Class FileSource<T>
- java.lang.Object
-
- net.obvj.confectory.source.AbstractSource<T>
-
- net.obvj.confectory.source.FileSource<T>
-
- All Implemented Interfaces:
Source<T>
public class FileSource<T> extends AbstractSource<T> implements Source<T>
A specialized configuration source implementation for loading a local file from the file system.The path may contain system environment variables, which must be placed between
"${"and"}". For example:"${TEMP}/file.txt"- Since:
- 0.1.0
- Author:
- oswaldo.bapvic.jr (Oswaldo Junior)
-
-
Constructor Summary
Constructors Constructor Description FileSource(String path)Builds a new configuration source for specific local file from the file system.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tload(Mapper<T> mapper)Applies a specific configuration loading strategy and returns a mapped bean containing the retrieved data, throwing an exception if the operation fails.-
Methods inherited from class net.obvj.confectory.source.AbstractSource
equals, hashCode, load, toString
-
-
-
-
Constructor Detail
-
FileSource
public FileSource(String path)
Builds a new configuration source for specific local file from the file system.- Parameters:
path- the file path for this configuration source.
-
-