{title:'VarResolver', created:'8.0.0', deprecated:'8.1.2'}

The Microservice API incorporates the {@doc jm.SimpleVariableLanguage Simple Variable Language} API.

The variable resolver can be augmented through the following methods:

- {@link oaj.microservice.Microservice.Builder}
  - {@link oaj.microservice.Microservice.Builder#vars(Class...) vars(Class...)}
  - {@link oaj.microservice.Microservice.Builder#varBean(Class,Object) varBean(Class,Object)}

A typical usage pattern is shown below:

| // $A used in variable resolver. | VarResolver varResolver = Microservice.getInstance().getVarResolver(); | System.out.println(varResolver.resolve("Main class is set to $MF{Main-Class, unknown}"));

The variable resolver becomes much more powerful when used in REST resource annotations which will be described latter in {@doc juneau-microservice-jetty}

By default, support for the following variables are provided:

- $S{key[,default]} - {@link oaj.svl.vars.SystemPropertiesVar}
- $E{key[,default]} - {@link oaj.svl.vars.EnvVariablesVar}
- $A{key[,default]} - {@link oaj.svl.vars.ArgsVar}
- $C{key[,default]} - {@link oaj.config.vars.ConfigVar}
- $MF{key[,default]} - {@link oaj.svl.vars.ManifestFileVar}
- $IF{arg,then[,else]} - {@link oaj.svl.vars.IfVar}
- $SW{arg,pattern1:then1[,pattern2:then2...]} - {@link oaj.svl.vars.SwitchVar}
- $CO{arg[,arg2...]} - {@link oaj.svl.vars.CoalesceVar}
- $PM{arg,pattern} - {@link oaj.svl.vars.PatternMatchVar}
- $UC{arg} - {@link oaj.svl.vars.UpperCaseVar}
- $LC{arg} - {@link oaj.svl.vars.LowerCaseVar}
- $NE{arg} - {@link oaj.svl.vars.NotEmptyVar}