de.digitalcollections.iiif.hymir.frontend.GlobalControllerAdvice 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.frontend;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ModelAttribute;
/** Adds the webjar versions read from yaml files as global model attribute. */
@ControllerAdvice
public class GlobalControllerAdvice {
@Autowired
@Value("#{webjarVersions}")
private Map webjarVersions;
@ModelAttribute("webjarVersions")
public Map getWebjarVersions() {
return webjarVersions;
}
}