Feat/restructuring (#422)
* Did restructuring and made repo validation interceptor an optional bean instead as it makes it more clean * Moved construction of FHIR servlet into a bean for better reuse of others that would like to depend directly on this library * Disabled default validation enabled
This commit is contained in:
committed by
GitHub
parent
c5e460dab0
commit
d660d5f76d
@@ -1,20 +0,0 @@
|
||||
package ca.uhn.fhir.jpa.starter;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchRestClientAutoConfiguration;
|
||||
import org.springframework.boot.web.servlet.ServletComponentScan;
|
||||
|
||||
@ServletComponentScan(basePackageClasses = {JpaRestfulServer.class})
|
||||
@SpringBootApplication(exclude = ElasticsearchRestClientAutoConfiguration.class)
|
||||
public class Demo {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
System.setProperty("spring.profiles.active", "r4");
|
||||
System.setProperty("spring.batch.job.enabled", "false");
|
||||
SpringApplication.run(Demo.class, args);
|
||||
|
||||
//Server is now accessible at eg. http://localhost:8080/fhir/metadata
|
||||
}
|
||||
}
|
||||
@@ -113,7 +113,7 @@ public class ExampleServerDstu3IT implements IServerSupport {
|
||||
.execute();
|
||||
|
||||
List<Parameters.ParametersParameterComponent> response = outParams.getParameter();
|
||||
Assert.assertTrue(!response.isEmpty());
|
||||
Assert.assertFalse(response.isEmpty());
|
||||
Parameters.ParametersParameterComponent component = response.get(0);
|
||||
Assert.assertTrue(component.getResource() instanceof MeasureReport);
|
||||
MeasureReport report = (MeasureReport) component.getResource();
|
||||
@@ -149,7 +149,7 @@ public class ExampleServerDstu3IT implements IServerSupport {
|
||||
private Bundle loadBundle(String theLocation, FhirContext theCtx, IGenericClient theClient) throws IOException {
|
||||
String json = stringFromResource(theLocation);
|
||||
Bundle bundle = (Bundle) theCtx.newJsonParser().parseResource(json);
|
||||
Bundle result = (Bundle) theClient.transaction().withBundle(bundle).execute();
|
||||
Bundle result = theClient.transaction().withBundle(bundle).execute();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
package ca.uhn.fhir.jpa.starter;
|
||||
|
||||
import ca.uhn.fhir.context.FhirContext;
|
||||
import ca.uhn.fhir.jpa.partition.SystemRequestDetails;
|
||||
import ca.uhn.fhir.jpa.searchparam.SearchParameterMap;
|
||||
import ca.uhn.fhir.rest.api.CacheControlDirective;
|
||||
import ca.uhn.fhir.rest.api.EncodingEnum;
|
||||
import ca.uhn.fhir.rest.api.MethodOutcome;
|
||||
import ca.uhn.fhir.rest.api.server.IBundleProvider;
|
||||
import ca.uhn.fhir.rest.client.api.IGenericClient;
|
||||
import ca.uhn.fhir.rest.client.api.ServerValidationModeEnum;
|
||||
|
||||
import org.eclipse.jetty.websocket.api.Session;
|
||||
import org.eclipse.jetty.websocket.client.ClientUpgradeRequest;
|
||||
import org.eclipse.jetty.websocket.client.WebSocketClient;
|
||||
|
||||
@@ -15,10 +15,10 @@ import java.util.List;
|
||||
public class SocketImplementation {
|
||||
|
||||
private static final Logger ourLog = org.slf4j.LoggerFactory.getLogger(SocketImplementation.class);
|
||||
private String myCriteria;
|
||||
private final String myCriteria;
|
||||
protected String myError;
|
||||
protected boolean myGotBound;
|
||||
private List<String> myMessages = new ArrayList<String>();
|
||||
private final List<String> myMessages = new ArrayList<String>();
|
||||
protected int myPingCount;
|
||||
protected String mySubsId;
|
||||
private Session session;
|
||||
|
||||
Reference in New Issue
Block a user