Skip to content

Configuration Options

Andy Clement edited this page Feb 5, 2014 · 9 revisions

SpringLoaded can be configured in two ways, through a system property or via a properties file.

Configuring via system property:

java -Dspringloaded=XXX -javaagent:pathto/springloaded.jar -noverify MyCode

XXX should be a semicolon separated list of either individual directives or key=value pairs. For example:

-Dspringloaded=verbose;explain;profile=grails

Supported directives:

verbose - verbose causes SpringLoaded to produce java.util.Logging output which goes into great detail on the reloading process, for example: what types is it processing? when does the filesystem watcher notice class file changes?

explain - produces some explanation as to why springloaded is making certain decisions. For example when SpringLoaded fails to make your type reloadable and you need to know why. Is it because you used a package name it considers infrastructure and deliberately doesn't make reloadable (like org.springframework)? Explain mode will tell you that.

caching - during the first startup springloaded will store information in a cache folder to speed up later restarts. The default cache dir is <userhome>/.slcache.

Supported key/value pairs:

cacheDir=XXXX - overrides the default cache directory. e.g. cacheDir=/tmp

plugins=XXXX - a comma separated list of plugins for SpringLoaded to add to the build in set. New plugins enable reloading to play nicely with other frameworks/libraries. e.g. plugins=org.foo.MyPlugin,org.bar.MyOtherPlugin

profile=grails - A profile represents a particular configuration of SpringLoaded options, basically a shorthand for specifying all those options individually. The grails profile turns on the options caching and plugins=org.springsource.loaded.SystemPropertyConfiguredIsReloadableTypePlugin. The default cache directory will be <userhome>/.grails unless the additional option cacheDir is specified.

Configuring via properties file

tbd

Clone this wiki locally