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:
- SVL Variables — the
VarAPI for defining variables, and the predefined ones. - VarResolvers — creating and configuring resolvers.
- VarResolver.DEFAULT — the reusable default resolver.
- SVL Other Notes — escaping, recursion, and efficiency notes.
// 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
- Simple Variable Language — the full SVL language reference.
- @Value Annotation Basics — declarative config injection built on SVL.
- @Value Framework-Internal Adoption
-
org.apache.juneau.commons.svl.VarResolver