Skip to main content

Marshall Simple Variable Language

The org.apache.juneau.commons.svl package defines "Simple Variable Language" (SVL) — text containing variables of the form $varName{varKey} that are resolved by a VarResolver. SVL is used extensively across the Config, REST, and Microservice APIs, and by many Juneau annotations so that values can be sourced from configuration files, environment variables, and system properties.

The canonical reference for the language itself — the built-in source variables, the #{...} function-call syntax and function catalog, the VarTemplate compiled-template API, and Supplier<String> live-reload patterns — is Simple Variable Language. This section collects the marshall-context-specific SVL topics:

// The default resolver handles $S (system property) and $E (environment) variables out of the box.
String property = VarResolver.DEFAULT.resolve("The Java home directory is $S{java.home}");

See also​