diff --git a/oxo-web/src/main/java/uk/ac/ebi/spot/config/OxOWebMvcConfig.java b/oxo-web/src/main/java/uk/ac/ebi/spot/config/OxOWebMvcConfig.java index a204683..872bbf8 100644 --- a/oxo-web/src/main/java/uk/ac/ebi/spot/config/OxOWebMvcConfig.java +++ b/oxo-web/src/main/java/uk/ac/ebi/spot/config/OxOWebMvcConfig.java @@ -5,6 +5,8 @@ import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.PathMatchConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.springframework.web.servlet.config.annotation.*; + /** * @author Simon Jupp @@ -33,4 +35,11 @@ public void configurePathMatch(PathMatchConfigurer configurer) { } + + public void addResourceHandlers(ResourceHandlerRegistry registry) { + if(System.getenv("OXO_CUSTOM")!=null) { + String resource = "file:" + System.getenv("OXO_CUSTOM")+"/"; + registry.addResourceHandler("/custom/**").addResourceLocations(resource); + } + } } diff --git a/oxo-web/src/main/java/uk/ac/ebi/spot/controller/ui/CustomisationProperties.java b/oxo-web/src/main/java/uk/ac/ebi/spot/controller/ui/CustomisationProperties.java index fbed96a..c8bbb2b 100644 --- a/oxo-web/src/main/java/uk/ac/ebi/spot/controller/ui/CustomisationProperties.java +++ b/oxo-web/src/main/java/uk/ac/ebi/spot/controller/ui/CustomisationProperties.java @@ -13,7 +13,7 @@ public class CustomisationProperties { @Value("${oxo.customisation.debrand:false}") private boolean debrand; - @Value("${oxo.customisation.logo:/img/OXO_logo_2017_colour_background.png") + @Value("${oxo.customisation.logo:/img/OXO_logo_2017_colour_background.png}") private String logo; @Value("${oxo.customisation.title:Ontology Xref Service}") diff --git a/oxo-web/src/main/resources/templates/fragments/header.html b/oxo-web/src/main/resources/templates/fragments/header.html index 80257ae..47dcb20 100644 --- a/oxo-web/src/main/resources/templates/fragments/header.html +++ b/oxo-web/src/main/resources/templates/fragments/header.html @@ -21,7 +21,7 @@