committed by
GitHub
parent
9a513cd184
commit
96ff27f173
@@ -72,6 +72,8 @@ public class AppProperties {
|
||||
private Boolean install_transitive_ig_dependencies = true;
|
||||
private Map<String, ImplementationGuide> implementationGuides = null;
|
||||
|
||||
private String staticLocation = null;
|
||||
|
||||
private Boolean lastn_enabled = false;
|
||||
private boolean store_resource_in_lucene_index_enabled = false;
|
||||
private NormalizedQuantitySearchLevel normalized_quantity_search_level = NormalizedQuantitySearchLevel.NORMALIZED_QUANTITY_SEARCH_NOT_SUPPORTED;
|
||||
@@ -89,6 +91,16 @@ public class AppProperties {
|
||||
return custom_interceptor_classes;
|
||||
}
|
||||
|
||||
|
||||
public String getStaticLocation() {
|
||||
return staticLocation;
|
||||
}
|
||||
|
||||
public void setStaticLocation(String staticLocation) {
|
||||
this.staticLocation = staticLocation;
|
||||
}
|
||||
|
||||
|
||||
public Boolean getOpenapi_enabled() {
|
||||
return openapi_enabled;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package ca.uhn.fhir.jpa.starter;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnProperty(prefix = "hapi.fhir", name = "staticLocation")
|
||||
public class ExtraStaticFilesConfigurer implements WebMvcConfigurer {
|
||||
|
||||
@Autowired
|
||||
AppProperties appProperties;
|
||||
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry theRegistry) {
|
||||
theRegistry
|
||||
.addResourceHandler("/static/**")
|
||||
.addResourceLocations(appProperties.getStaticLocation());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user