de.digitalcollections.iiif.hymir.Application Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of iiif-server-hymir Show documentation
Show all versions of iiif-server-hymir Show documentation
Hymir is a Java based IIIF Server. It is based on "IIIF API Java Libraries" (Java implementations of the IIIF specifications, see https://github.com/dbmdz/iiif-apis).
package de.digitalcollections.iiif.hymir;
import org.springframework.boot.Banner;
import org.springframework.boot.ResourceBanner;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
@SpringBootApplication
public class Application {
public static void main(String[] args) {
// Allow escaped slashes in routes
System.setProperty("org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH", "true");
SpringApplicationBuilder builder = new SpringApplicationBuilder(Application.class);
builder.banner(hymirBanner());
builder.run(args);
}
private static Banner hymirBanner() {
Resource resource = new ClassPathResource("banner.txt");
return new ResourceBanner(resource);
}
}