Classpath repository

Classpath repository scans resources in classpath in search of parameters. Useful in first stage of development or to keep default values for server-specific parameters.



Except for that, classpath repository needs relfections to be present in classpath (Maven Central page).


ClasspathParamRepository classpathRepository = new ClasspathParamRepository("/param/", ".*\\.param$");

First constructor argument is a base path of parameter resources, second argument is a regular expression filter. Only resources which name matches will be interpreted.


Classpath repository performs a recurrent scan on given base path. If resource matches, it is treated as parameter and deserializer from smartparam-serializer is used to read it.

Resource name is not important, only parameter name matters. Serialization format.