com.ja.smarkdown.config.servletcontext.DefaultSmarkdownConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of smarkdown-configuration-web-xml Show documentation
Show all versions of smarkdown-configuration-web-xml Show documentation
Reads Smarkdown configuration from the web.xml file. Uses a default configuration if no specific configuration is defined
in web.xml.
package com.ja.smarkdown.config.servletcontext;
import static com.ja.smarkdown.model.config.Location.create;
import javax.enterprise.inject.Alternative;
import com.ja.smarkdown.model.config.SmarkdownConfiguration;
@Alternative
public class DefaultSmarkdownConfiguration extends SmarkdownConfiguration {
public DefaultSmarkdownConfiguration() {
super();
getLocations().add(
create(String.format("file://%s/smarkdown",
System.getProperty("user.home"))));
getLocations().add(create("web-inf:smarkdown/md"));
getLocations().add(create("webapp:smarkdown/md"));
getLocations().add(create("classpath:"));
}
}