Skip to content

Commit

Permalink
#414: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Ohr committed Jun 6, 2024
1 parent 5e76575 commit dec8db4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,25 +87,25 @@ private int freePort() throws Exception {
public void beforeEach(ExtensionContext extensionContext) throws Exception {
if (server == null) {
fhirAuditServer = new FhirAuditServer();
DeploymentInfo servletBuilder = deployment()
var servletBuilder = deployment()
.setClassLoader(FhirAuditRepository.class.getClassLoader())
.setContextPath("/" + contextPath)
.setDeploymentName("FHIR-Deployment")
.addServlets(
servlet("FhirAuditServer", FhirAuditServer.class, new FhirServletInitiator(fhirAuditServer))
.addMapping("/*"));
.addMapping("/*"));

DeploymentManager manager = defaultContainer().addDeployment(servletBuilder);
var manager = defaultContainer().addDeployment(servletBuilder);
manager.deploy();

HttpHandler servletHandler = manager.start();
PathHandler path = Handlers
var servletHandler = manager.start();
var path = Handlers
.path(Handlers.redirect("/"))
.addPrefixPath("/", servletHandler);
server = Undertow.builder()
.setServerOption(UndertowOptions.ENABLE_HTTP2, true)
.addHttpsListener(
httpsPort,"localhost", setupDefaultTlsParameter().getSSLContext(true))
httpsPort, "localhost", setupDefaultTlsParameter().getSSLContext(true))
.setHandler(path)
.build();
server.start();
Expand All @@ -121,13 +121,14 @@ private void registerShutdownHook() {
extensionContext.getRoot().getStore(GLOBAL).put(STORE_KEY, closeableResource);
}

public static int getServerHttpsPort(){
public static int getServerHttpsPort() {
return httpsPort;
}

public static String getServerContextPath(){
public static String getServerContextPath() {
return contextPath;
}

public static List<AuditEvent> getAuditEvents() {
return fhirAuditServer.getAuditEvents();
}
Expand All @@ -136,7 +137,7 @@ public static void clearAuditEvents() {
fhirAuditServer.clearAuditEvents();
}

private boolean hasStartedUndertow(){
private boolean hasStartedUndertow() {
return extensionContext.getRoot().getStore(GLOBAL).get(STORE_KEY) != null;
}

Expand All @@ -149,7 +150,7 @@ public FhirServletInitiator(FhirAuditServer fhirAuditServer) {
}

@Override
public InstanceHandle<FhirAuditServer> createInstance() throws InstantiationException {
public InstanceHandle<FhirAuditServer> createInstance() {
return new InstanceHandle<>() {
@Override
public FhirAuditServer getInstance() {
Expand Down
6 changes: 6 additions & 0 deletions dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<hapi-fhir-version>7.2.0</hapi-fhir-version>
<herasaf-version>3.0.2</herasaf-version>
<ipf-gazelle-version>3.0.0</ipf-gazelle-version>
<httpclient5-version>5.3.1</httpclient5-version>
<ipf-oht-mdht-version>1.2.0.201212201425</ipf-oht-mdht-version>
<!-- hapi-fhir already require jackson 2.15 while spring-boot is on 2.13 -->
<jackson-version>2.16.2</jackson-version>
Expand Down Expand Up @@ -379,6 +380,11 @@
<classifier>xqj</classifier>
<version>${saxon-he-version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<version>${httpclient5-version}</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
Expand Down

0 comments on commit dec8db4

Please sign in to comment.