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());
|
||||
}
|
||||
}
|
||||
@@ -52,6 +52,7 @@ spring:
|
||||
# hibernate.search.backend.analysis.configurer: ca.uhn.fhir.jpa.search.HapiHSearchAnalysisConfigurers$HapiElasticAnalysisConfigurer
|
||||
hapi:
|
||||
fhir:
|
||||
|
||||
### This enables the swagger-ui at /fhir/swagger-ui/index.html as well as the /fhir/api-docs (see https://hapifhir.io/hapi-fhir/docs/server_plain/openapi.html)
|
||||
openapi_enabled: true
|
||||
### This is the FHIR version. Choose between, DSTU2, DSTU3, R4 or R5
|
||||
@@ -62,6 +63,8 @@ hapi:
|
||||
### forces the use of the https:// protocol for the returned server address.
|
||||
### alternatively, it may be set using the X-Forwarded-Proto header.
|
||||
# use_apache_address_strategy_https: false
|
||||
### enables the server to host content like HTML, css, etc. under the url pattern of /static/**
|
||||
# staticLocation: file:/usr/somewhere/
|
||||
### enable to set the Server URL
|
||||
# server_address: http://hapi.fhir.org/baseR4
|
||||
# defer_indexing_for_codesystems_of_size: 101
|
||||
|
||||
Reference in New Issue
Block a user