Merge branch 'master' into expose-search-prefetch-thresholds
This commit is contained in:
16
pom.xml
16
pom.xml
@@ -43,14 +43,6 @@
|
|||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<!-- Temporarily override CR depedencies for debugging -->
|
|
||||||
<!-- <dependency>-->
|
|
||||||
<!-- <groupId>org.opencds.cqf.fhir</groupId>-->
|
|
||||||
<!-- <artifactId>cqf-fhir-bom</artifactId>-->
|
|
||||||
<!-- <version>3.4.0</version>-->
|
|
||||||
<!-- <type>pom</type>-->
|
|
||||||
<!-- <scope>import</scope>-->
|
|
||||||
<!-- </dependency>-->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.glassfish.jaxb</groupId>
|
<groupId>org.glassfish.jaxb</groupId>
|
||||||
<artifactId>jaxb-runtime</artifactId>
|
<artifactId>jaxb-runtime</artifactId>
|
||||||
@@ -364,6 +356,14 @@
|
|||||||
<version>1.13.3</version>
|
<version>1.13.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- https://mvnrepository.com/artifact/io.micrometer/micrometer-registry-prometheus-simpleclient -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.micrometer</groupId>
|
||||||
|
<artifactId>micrometer-registry-prometheus-simpleclient</artifactId>
|
||||||
|
<version>1.13.3</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.zaxxer</groupId>
|
<groupId>com.zaxxer</groupId>
|
||||||
<artifactId>HikariCP</artifactId>
|
<artifactId>HikariCP</artifactId>
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ public class AppProperties {
|
|||||||
private final List<String> custom_interceptor_classes = new ArrayList<>();
|
private final List<String> custom_interceptor_classes = new ArrayList<>();
|
||||||
|
|
||||||
private final List<String> custom_provider_classes = new ArrayList<>();
|
private final List<String> custom_provider_classes = new ArrayList<>();
|
||||||
|
private Boolean upliftedRefchains_enabled = false;
|
||||||
|
|
||||||
private List<Integer> search_prefetch_thresholds = new ArrayList<>();
|
private List<Integer> search_prefetch_thresholds = new ArrayList<>();
|
||||||
|
|
||||||
@@ -653,6 +654,13 @@ public Cors getCors() {
|
|||||||
this.search_prefetch_thresholds = thePrefetchThresholds;
|
this.search_prefetch_thresholds = thePrefetchThresholds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean getUpliftedRefchains_enabled() {
|
||||||
|
return upliftedRefchains_enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpliftedRefchains_enabled(boolean upliftedRefchains_enabled) {
|
||||||
|
this.upliftedRefchains_enabled = upliftedRefchains_enabled;
|
||||||
|
}
|
||||||
|
|
||||||
public static class Cors {
|
public static class Cors {
|
||||||
private Boolean allow_Credentials = true;
|
private Boolean allow_Credentials = true;
|
||||||
|
|||||||
@@ -149,6 +149,7 @@ public class FhirServerConfigCommon {
|
|||||||
jpaStorageSettings.setDeleteExpungeEnabled(appProperties.getDelete_expunge_enabled());
|
jpaStorageSettings.setDeleteExpungeEnabled(appProperties.getDelete_expunge_enabled());
|
||||||
jpaStorageSettings.setExpungeEnabled(appProperties.getExpunge_enabled());
|
jpaStorageSettings.setExpungeEnabled(appProperties.getExpunge_enabled());
|
||||||
jpaStorageSettings.setLanguageSearchParameterEnabled(appProperties.getLanguage_search_parameter_enabled());
|
jpaStorageSettings.setLanguageSearchParameterEnabled(appProperties.getLanguage_search_parameter_enabled());
|
||||||
|
jpaStorageSettings.setIndexOnUpliftedRefchains(appProperties.getUpliftedRefchains_enabled());
|
||||||
|
|
||||||
|
|
||||||
if (!appProperties.getSearch_prefetch_thresholds().isEmpty()) {
|
if (!appProperties.getSearch_prefetch_thresholds().isEmpty()) {
|
||||||
|
|||||||
@@ -1,31 +1,37 @@
|
|||||||
#Uncomment the "servlet" and "context-path" lines below to make the fhir endpoint available at /example/path/fhir instead of the default value of /fhir
|
#Uncomment the "servlet" and "context-path" lines below to make the fhir endpoint available at /example/path/fhir instead of the default value of /fhir
|
||||||
server:
|
server:
|
||||||
# servlet:
|
# servlet:
|
||||||
# context-path: /example/path
|
# context-path: /example/path
|
||||||
port: 8080
|
port: 8080
|
||||||
#Adds the option to go to eg. http://localhost:8080/actuator/health for seeing the running configuration
|
#Adds the option to go to eg. http://localhost:8080/actuator/health for seeing the running configuration
|
||||||
#see https://docs.spring.io/spring-boot/docs/current/reference/html/actuator.html#actuator.endpoints
|
#see https://docs.spring.io/spring-boot/docs/current/reference/html/actuator.html#actuator.endpoints
|
||||||
management:
|
management:
|
||||||
endpoint:
|
#The following configuration will enable the actuator endpoints at /actuator/health, /actuator/info, /actuator/prometheus, /actuator/metrics. For security purposes, only /actuator/health is enabled by default.
|
||||||
endpoints:
|
endpoints:
|
||||||
enabled-by-default: false
|
enabled-by-default: false
|
||||||
web:
|
web:
|
||||||
exposure:
|
exposure:
|
||||||
include: health,prometheus
|
include: 'health' # or e.g. 'info,health,prometheus,metrics' or '*' for all'
|
||||||
|
endpoint:
|
||||||
|
info:
|
||||||
|
enabled: true
|
||||||
|
metrics:
|
||||||
|
enabled: true
|
||||||
health:
|
health:
|
||||||
enabled: true
|
enabled: true
|
||||||
probes:
|
probes:
|
||||||
enabled: true
|
enabled: true
|
||||||
livenessState:
|
group:
|
||||||
enabled: true
|
liveness:
|
||||||
readinessState:
|
include:
|
||||||
enabled: true
|
- livenessState
|
||||||
|
- readinessState
|
||||||
prometheus:
|
prometheus:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
prometheus:
|
||||||
metrics:
|
metrics:
|
||||||
export:
|
export:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
main:
|
main:
|
||||||
allow-circular-references: true
|
allow-circular-references: true
|
||||||
@@ -184,6 +190,7 @@ hapi:
|
|||||||
# enable_index_missing_fields: false
|
# enable_index_missing_fields: false
|
||||||
# enable_index_of_type: true
|
# enable_index_of_type: true
|
||||||
# enable_index_contained_resource: false
|
# enable_index_contained_resource: false
|
||||||
|
# upliftedRefchains_enabled: true
|
||||||
# resource_dbhistory_enabled: false
|
# resource_dbhistory_enabled: false
|
||||||
### !!Extended Lucene/Elasticsearch Indexing is still a experimental feature, expect some features (e.g. _total=accurate) to not work as expected!!
|
### !!Extended Lucene/Elasticsearch Indexing is still a experimental feature, expect some features (e.g. _total=accurate) to not work as expected!!
|
||||||
### more information here: https://hapifhir.io/hapi-fhir/docs/server_jpa/elastic.html
|
### more information here: https://hapifhir.io/hapi-fhir/docs/server_jpa/elastic.html
|
||||||
|
|||||||
@@ -6,10 +6,32 @@ server:
|
|||||||
#Adds the option to go to eg. http://localhost:8080/actuator/health for seeing the running configuration
|
#Adds the option to go to eg. http://localhost:8080/actuator/health for seeing the running configuration
|
||||||
#see https://docs.spring.io/spring-boot/docs/current/reference/html/actuator.html#actuator.endpoints
|
#see https://docs.spring.io/spring-boot/docs/current/reference/html/actuator.html#actuator.endpoints
|
||||||
management:
|
management:
|
||||||
|
#The following configuration will enable the actuator endpoints at /actuator/health, /actuator/info, /actuator/prometheus, /actuator/metrics. For security purposes, only /actuator/health is enabled by default.
|
||||||
endpoints:
|
endpoints:
|
||||||
|
enabled-by-default: false
|
||||||
web:
|
web:
|
||||||
exposure:
|
exposure:
|
||||||
include: "health,prometheus"
|
include: 'health' # or e.g. 'info,health,prometheus,metrics' or '*' for all'
|
||||||
|
endpoint:
|
||||||
|
info:
|
||||||
|
enabled: true
|
||||||
|
metrics:
|
||||||
|
enabled: true
|
||||||
|
health:
|
||||||
|
enabled: true
|
||||||
|
probes:
|
||||||
|
enabled: true
|
||||||
|
group:
|
||||||
|
liveness:
|
||||||
|
include:
|
||||||
|
- livenessState
|
||||||
|
- readinessState
|
||||||
|
prometheus:
|
||||||
|
enabled: true
|
||||||
|
prometheus:
|
||||||
|
metrics:
|
||||||
|
export:
|
||||||
|
enabled: true
|
||||||
spring:
|
spring:
|
||||||
main:
|
main:
|
||||||
allow-circular-references: true
|
allow-circular-references: true
|
||||||
|
|||||||
@@ -13,6 +13,10 @@ import ca.uhn.fhir.rest.client.api.ServerValidationModeEnum;
|
|||||||
import jakarta.websocket.ContainerProvider;
|
import jakarta.websocket.ContainerProvider;
|
||||||
import jakarta.websocket.Session;
|
import jakarta.websocket.Session;
|
||||||
import jakarta.websocket.WebSocketContainer;
|
import jakarta.websocket.WebSocketContainer;
|
||||||
|
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||||
|
import org.apache.http.client.methods.HttpGet;
|
||||||
|
import org.apache.http.impl.client.CloseableHttpClient;
|
||||||
|
import org.apache.http.impl.client.HttpClients;
|
||||||
import org.hl7.fhir.instance.model.api.IBaseResource;
|
import org.hl7.fhir.instance.model.api.IBaseResource;
|
||||||
import org.hl7.fhir.instance.model.api.IIdType;
|
import org.hl7.fhir.instance.model.api.IIdType;
|
||||||
import org.hl7.fhir.r4.model.Bundle;
|
import org.hl7.fhir.r4.model.Bundle;
|
||||||
@@ -29,6 +33,8 @@ import org.hl7.fhir.r4.model.Subscription;
|
|||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Order;
|
import org.junit.jupiter.api.Order;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.junit.jupiter.params.ParameterizedTest;
|
||||||
|
import org.junit.jupiter.params.provider.ValueSource;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
import org.springframework.boot.test.web.server.LocalServerPort;
|
import org.springframework.boot.test.web.server.LocalServerPort;
|
||||||
@@ -306,6 +312,17 @@ class ExampleServerR4IT implements IServerSupport {
|
|||||||
.size();
|
.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ParameterizedTest
|
||||||
|
@ValueSource(strings = {"prometheus", "health", "metrics", "info"})
|
||||||
|
void testActuatorEndpointExists(String endpoint) throws IOException {
|
||||||
|
|
||||||
|
CloseableHttpClient httpclient = HttpClients.createDefault();
|
||||||
|
CloseableHttpResponse response = httpclient.execute(new HttpGet("http://localhost:" + port + "/actuator/" + endpoint));
|
||||||
|
int statusCode = response.getStatusLine().getStatusCode();
|
||||||
|
assertEquals(200, statusCode);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
void beforeEach() {
|
void beforeEach() {
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,30 @@
|
|||||||
|
management:
|
||||||
|
#The following configuration will enable the actuator endpoints at /actuator/health, /actuator/info, /actuator/prometheus
|
||||||
|
endpoints:
|
||||||
|
enabled-by-default: false
|
||||||
|
web:
|
||||||
|
exposure:
|
||||||
|
include: 'info,health,prometheus,metrics' # or '*' for all'
|
||||||
|
endpoint:
|
||||||
|
info:
|
||||||
|
enabled: true
|
||||||
|
metrics:
|
||||||
|
enabled: true
|
||||||
|
health:
|
||||||
|
enabled: true
|
||||||
|
probes:
|
||||||
|
enabled: true
|
||||||
|
group:
|
||||||
|
liveness:
|
||||||
|
include:
|
||||||
|
- livenessState
|
||||||
|
- readinessState
|
||||||
|
prometheus:
|
||||||
|
enabled: true
|
||||||
|
prometheus:
|
||||||
|
metrics:
|
||||||
|
export:
|
||||||
|
enabled: true
|
||||||
spring:
|
spring:
|
||||||
main:
|
main:
|
||||||
allow-circular-references: true
|
allow-circular-references: true
|
||||||
|
|||||||
Reference in New Issue
Block a user