java.lang.Object
io.jooby.EnvironmentOptions
Available environment options.
- Since:
- 2.0.0
- Author:
- edgar
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionActive environment names or fallback and read them from system property:application.env
.Base directory to use ornull
for default.Class loader.getClassLoader
(ClassLoader defaultClassLoader) Class loader.Configuration file name.setActiveNames
(String... activeNames) Set active environment names.setActiveNames
(List<String> activeNames) Set active environment names.setBasedir
(String basedir) Set base dir.setBasedir
(Path basedir) Set base dir.setClassLoader
(ClassLoader classLoader) Set class loader.setFilename
(String filename) Set file name.
-
Constructor Details
-
EnvironmentOptions
public EnvironmentOptions()Creates environment options. Default application file name is:application.conf
.
-
-
Method Details
-
getActiveNames
Active environment names or fallback and read them from system property:application.env
.- Returns:
- Active environment names.
-
setActiveNames
Set active environment names.- Parameters:
activeNames
- Active environment names.- Returns:
- This options.
-
setActiveNames
Set active environment names.- Parameters:
activeNames
- Active environment names.- Returns:
- This options.
-
getClassLoader
Class loader.- Returns:
- Class loader.
-
getClassLoader
Class loader.- Parameters:
defaultClassLoader
- Default classloader is none was set.- Returns:
- Class loader.
-
setClassLoader
Set class loader.- Parameters:
classLoader
- Class loader.- Returns:
- This options.
-
getBasedir
Base directory to use ornull
for default.- Returns:
- Base directory to use or
null
for default.s
-
getFilename
Configuration file name.- Returns:
- Configuration file name.
-
setBasedir
Set base dir.- Parameters:
basedir
- Base dir. Classpath folder or file system directory.- Returns:
- This options.
-
setBasedir
Set base dir.- Parameters:
basedir
- Base dir.- Returns:
- This options.
-
setFilename
Set file name.- Parameters:
filename
- File name with extension. Supported extensions are:.properties
,.conf
and.json
.- Returns:
- This environment.
-