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.

Dependencies

<dependency>
    <groupId>org.smartparam</groupId>
    <artifactId>smartparam-repository-fs</artifactId>
    <version>1.1.1</version>
</dependency>

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

Usage

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.

Behavior

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.