org.zodiac.autoconfigure.template.velocity.VelocityTemplateAvailabilityProvider Maven / Gradle / Ivy
package org.zodiac.autoconfigure.template.velocity;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.springframework.boot.autoconfigure.template.PathBasedTemplateAvailabilityProvider;
import org.zodiac.template.velocity.constants.VelocityTemplateConstants;
public class VelocityTemplateAvailabilityProvider extends PathBasedTemplateAvailabilityProvider {
public VelocityTemplateAvailabilityProvider() {
super("org.apache.velocity.app.VelocityEngine", VelocityTemplateAvailabilityProperties.class,
"spring.velocity");
}
static class VelocityTemplateAvailabilityProperties extends TemplateAvailabilityProperties {
private List resourceLoaderPath =
new ArrayList(Arrays.asList(VelocityTemplateConstants.DEFAULT_RESOURCE_LOADER_PATH));
VelocityTemplateAvailabilityProperties() {
super(VelocityTemplateConstants.DEFAULT_PREFIX, VelocityTemplateConstants.DEFAULT_SUFFIX);
}
@Override
protected List getLoaderPath() {
return this.resourceLoaderPath;
}
public List getResourceLoaderPath() {
return this.resourceLoaderPath;
}
public void setResourceLoaderPath(List resourceLoaderPath) {
this.resourceLoaderPath = resourceLoaderPath;
}
}
}