diff --git a/hapi-fhir-jpaserver-base/src/main/resources/.keep b/hapi-fhir-jpaserver-base/src/main/resources/.keep
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/hapi-fhir-jpaserver-base/src/main/resources/fhir-spring-config.xml b/hapi-fhir-jpaserver-base/src/main/resources/fhir-spring-config.xml
deleted file mode 100644
index a7ca95c6e86..00000000000
--- a/hapi-fhir-jpaserver-base/src/main/resources/fhir-spring-config.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/hapi-fhir-jpaserver-base/src/main/resources/fhir-spring-search-config-dstu2.xml b/hapi-fhir-jpaserver-base/src/main/resources/fhir-spring-search-config-dstu2.xml
deleted file mode 100644
index 2e9740395a7..00000000000
--- a/hapi-fhir-jpaserver-base/src/main/resources/fhir-spring-search-config-dstu2.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/hapi-fhir-jpaserver-base/src/main/resources/fhir-spring-subscription-config-dstu2.xml b/hapi-fhir-jpaserver-base/src/main/resources/fhir-spring-subscription-config-dstu2.xml
deleted file mode 100644
index f276526efe6..00000000000
--- a/hapi-fhir-jpaserver-base/src/main/resources/fhir-spring-subscription-config-dstu2.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/hapi-fhir-jpaserver-base/src/test/resources/META-INF/persistence.xml b/hapi-fhir-jpaserver-base/src/test/resources/META-INF/persistence.xml
deleted file mode 100644
index 2497241c875..00000000000
--- a/hapi-fhir-jpaserver-base/src/test/resources/META-INF/persistence.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
- org.hibernate.ejb.HibernatePersistence
-
-
- ca.uhn.fhir.jpa.entity.ForcedId
- ca.uhn.fhir.jpa.entity.ResourceTable
- ca.uhn.fhir.jpa.entity.ResourceHistoryTable
- ca.uhn.fhir.jpa.entity.ResourceHistoryTag
- ca.uhn.fhir.jpa.entity.ResourceIndexedSearchParamDate
- ca.uhn.fhir.jpa.entity.ResourceIndexedSearchParamNumber
- ca.uhn.fhir.jpa.entity.ResourceIndexedSearchParamQuantity
- ca.uhn.fhir.jpa.entity.ResourceIndexedSearchParamString
- ca.uhn.fhir.jpa.entity.ResourceIndexedSearchParamToken
- ca.uhn.fhir.jpa.entity.ResourceIndexedSearchParamUri
- ca.uhn.fhir.jpa.entity.ResourceIndexedSearchParamCoords
- ca.uhn.fhir.jpa.entity.ResourceLink
- ca.uhn.fhir.jpa.entity.ResourceTag
- ca.uhn.fhir.jpa.entity.Search
- ca.uhn.fhir.jpa.entity.SearchResult
- ca.uhn.fhir.jpa.entity.SubscriptionTable
- ca.uhn.fhir.jpa.entity.SubscriptionFlaggedResource
- ca.uhn.fhir.jpa.entity.TagDefinition
-
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/hapi-fhir-jpaserver-base/src/test/resources/fhir-jpabase-spring-test-config.xml b/hapi-fhir-jpaserver-base/src/test/resources/fhir-jpabase-spring-test-config.xml
deleted file mode 100644
index 40801cb1284..00000000000
--- a/hapi-fhir-jpaserver-base/src/test/resources/fhir-jpabase-spring-test-config.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/hapi-fhir-jpaserver-example/pom.xml b/hapi-fhir-jpaserver-example/pom.xml
index 29e3f8c75f7..71a7762062c 100644
--- a/hapi-fhir-jpaserver-example/pom.xml
+++ b/hapi-fhir-jpaserver-example/pom.xml
@@ -61,6 +61,13 @@
war
provided
+
+ ca.uhn.hapi.fhir
+ hapi-fhir-testpage-overlay
+ 1.3-SNAPSHOT
+ classes
+ provided
+
diff --git a/hapi-fhir-jpaserver-example/src/main/java/ca/uhn/fhir/jpa/demo/AppCtxConfig.java b/hapi-fhir-jpaserver-example/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfig.java
similarity index 98%
rename from hapi-fhir-jpaserver-example/src/main/java/ca/uhn/fhir/jpa/demo/AppCtxConfig.java
rename to hapi-fhir-jpaserver-example/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfig.java
index f013552be42..65b6f2c4bb0 100644
--- a/hapi-fhir-jpaserver-example/src/main/java/ca/uhn/fhir/jpa/demo/AppCtxConfig.java
+++ b/hapi-fhir-jpaserver-example/src/main/java/ca/uhn/fhir/jpa/demo/FhirServerConfig.java
@@ -23,7 +23,7 @@ import ca.uhn.fhir.rest.server.interceptor.LoggingInterceptor;
@Configuration
@EnableTransactionManagement()
-public class AppCtxConfig extends BaseJavaConfigDstu2 {
+public class FhirServerConfig extends BaseJavaConfigDstu2 {
/**
* Configure FHIR properties around the the JPA server via this bean
diff --git a/hapi-fhir-jpaserver-example/src/main/java/ca/uhn/fhir/jpa/demo/FhirTesterConfig.java b/hapi-fhir-jpaserver-example/src/main/java/ca/uhn/fhir/jpa/demo/FhirTesterConfig.java
new file mode 100644
index 00000000000..947c46f9fa4
--- /dev/null
+++ b/hapi-fhir-jpaserver-example/src/main/java/ca/uhn/fhir/jpa/demo/FhirTesterConfig.java
@@ -0,0 +1,56 @@
+package ca.uhn.fhir.jpa.demo;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+
+import ca.uhn.fhir.context.FhirVersionEnum;
+import ca.uhn.fhir.to.FhirTesterMvcConfig;
+import ca.uhn.fhir.to.TesterConfig;
+
+//@formatter:off
+/**
+ * This spring config file configures the web testing module. It serves two
+ * purposes:
+ * 1. It imports FhirTesterMvcConfig, which is the spring config for the
+ * tester itself
+ * 2. It tells the tester which server(s) to talk to, via the testerConfig()
+ * method below
+ */
+@Configuration
+@Import(FhirTesterMvcConfig.class)
+public class FhirTesterConfig {
+
+ /**
+ * This bean tells the testing webpage which servers it should configure itself
+ * to communicate with. In this example we configure it to talk to the local
+ * server, as well as one public server. If you are creating a project to
+ * deploy somewhere else, you might choose to only put your own server's
+ * address here.
+ *
+ * Note the use of the ${serverBase} variable below. This will be replaced with
+ * the base URL as reported by the server itself. Often for a simple Tomcat
+ * (or other container) installation, this will end up being something
+ * like "http://localhost:8080/hapi-fhir-jpaserver-example". If you are
+ * deploying your server to a place with a fully qualified domain name,
+ * you might want to use that instead of using the variable.
+ */
+ @Bean
+ public TesterConfig testerConfig() {
+ TesterConfig retVal = new TesterConfig();
+ retVal
+ .addServer()
+ .withId("home")
+ .withFhirVersion(FhirVersionEnum.DSTU2)
+ .withBaseUrl("${serverBase}/baseDstu2")
+ .withName("Local Tester")
+ .addServer()
+ .withId("hapi")
+ .withFhirVersion(FhirVersionEnum.DSTU2)
+ .withBaseUrl("http://fhirtest.uhn.ca/baseDstu2")
+ .withName("Public HAPI Test Server");
+ return retVal;
+ }
+
+}
+//@formatter:on
diff --git a/hapi-fhir-jpaserver-example/src/main/java/ca/uhn/fhir/jpa/demo/JpaServerDemo.java b/hapi-fhir-jpaserver-example/src/main/java/ca/uhn/fhir/jpa/demo/JpaServerDemo.java
index b0a89460307..4e5c01cb738 100644
--- a/hapi-fhir-jpaserver-example/src/main/java/ca/uhn/fhir/jpa/demo/JpaServerDemo.java
+++ b/hapi-fhir-jpaserver-example/src/main/java/ca/uhn/fhir/jpa/demo/JpaServerDemo.java
@@ -124,7 +124,7 @@ public class JpaServerDemo extends RestfulServer {
setPagingProvider(new FifoMemoryPagingProvider(10));
/*
- * Load interceptors for the server from Spring (these are defined in AppCtxConfig.java)
+ * Load interceptors for the server from Spring (these are defined in FhirServerConfig.java)
*/
Collection interceptorBeans = myAppCtx.getBeansOfType(IServerInterceptor.class).values();
for (IServerInterceptor interceptor : interceptorBeans) {
diff --git a/hapi-fhir-jpaserver-example/src/main/resources/META-INF/fhirtest_persistence.xml b/hapi-fhir-jpaserver-example/src/main/resources/META-INF/fhirtest_persistence.xml
deleted file mode 100644
index 3cf4e80f5f0..00000000000
--- a/hapi-fhir-jpaserver-example/src/main/resources/META-INF/fhirtest_persistence.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
- org.hibernate.ejb.HibernatePersistence
-
- ca.uhn.fhir.jpa.entity.ForcedId
- ca.uhn.fhir.jpa.entity.ResourceHistoryTable
- ca.uhn.fhir.jpa.entity.ResourceHistoryTag
- ca.uhn.fhir.jpa.entity.ResourceIndexedSearchParamDate
- ca.uhn.fhir.jpa.entity.ResourceIndexedSearchParamNumber
- ca.uhn.fhir.jpa.entity.ResourceIndexedSearchParamQuantity
- ca.uhn.fhir.jpa.entity.ResourceIndexedSearchParamString
- ca.uhn.fhir.jpa.entity.ResourceIndexedSearchParamToken
- ca.uhn.fhir.jpa.entity.ResourceIndexedSearchParamUri
- ca.uhn.fhir.jpa.entity.ResourceIndexedSearchParamCoords
- ca.uhn.fhir.jpa.entity.ResourceLink
- ca.uhn.fhir.jpa.entity.ResourceTable
- ca.uhn.fhir.jpa.entity.ResourceTag
- ca.uhn.fhir.jpa.entity.SubscriptionTable
- ca.uhn.fhir.jpa.entity.SubscriptionFlaggedResource
- ca.uhn.fhir.jpa.entity.Search
- ca.uhn.fhir.jpa.entity.SearchResult
- ca.uhn.fhir.jpa.entity.TagDefinition
-
- true
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/hapi-fhir-jpaserver-example/src/main/webapp/WEB-INF/hapi-fhir-server-config.xml b/hapi-fhir-jpaserver-example/src/main/webapp/WEB-INF/hapi-fhir-server-config.xml
deleted file mode 100644
index 13219e8e020..00000000000
--- a/hapi-fhir-jpaserver-example/src/main/webapp/WEB-INF/hapi-fhir-server-config.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/hapi-fhir-jpaserver-example/src/main/webapp/WEB-INF/hapi-fhir-server-database-config.xml b/hapi-fhir-jpaserver-example/src/main/webapp/WEB-INF/hapi-fhir-server-database-config.xml
deleted file mode 100644
index 6e9f1f4a0d0..00000000000
--- a/hapi-fhir-jpaserver-example/src/main/webapp/WEB-INF/hapi-fhir-server-database-config.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/hapi-fhir-jpaserver-example/src/main/webapp/WEB-INF/hapi-fhir-tester-config.xml b/hapi-fhir-jpaserver-example/src/main/webapp/WEB-INF/hapi-fhir-tester-config.xml
deleted file mode 100644
index d3a9223133f..00000000000
--- a/hapi-fhir-jpaserver-example/src/main/webapp/WEB-INF/hapi-fhir-tester-config.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
- home , DSTU2 , Local Server , ${serverBase}/baseDstu2
-
-
-
-
-
-
-
-
diff --git a/hapi-fhir-jpaserver-example/src/main/webapp/WEB-INF/web.xml b/hapi-fhir-jpaserver-example/src/main/webapp/WEB-INF/web.xml
index e04013d82c0..c81a6f602d0 100644
--- a/hapi-fhir-jpaserver-example/src/main/webapp/WEB-INF/web.xml
+++ b/hapi-fhir-jpaserver-example/src/main/webapp/WEB-INF/web.xml
@@ -1,10 +1,9 @@
-
+
org.springframework.web.context.ContextLoaderListener
-
+
contextClass
@@ -14,21 +13,22 @@
contextConfigLocation
- ca.uhn.fhir.jpa.demo.AppCtxConfig
+ ca.uhn.fhir.jpa.demo.FhirServerConfig
-
+
spring
org.springframework.web.servlet.DispatcherServlet
+
+ contextClass
+ org.springframework.web.context.support.AnnotationConfigWebApplicationContext
+
contextConfigLocation
-
- /WEB-INF/hapi-fhir-tester-application-context.xml
- /WEB-INF/hapi-fhir-tester-config.xml
-
+ ca.uhn.fhir.jpa.demo.FhirTesterConfig
2
@@ -56,7 +56,7 @@
spring
/
-
+
diff --git a/hapi-fhir-jpaserver-example/src/test/java/ca/uhn/fhir/jpa/demo/ExampleServerIT.java b/hapi-fhir-jpaserver-example/src/test/java/ca/uhn/fhir/jpa/demo/ExampleServerIT.java
index 452503162dc..afa2c580087 100644
--- a/hapi-fhir-jpaserver-example/src/test/java/ca/uhn/fhir/jpa/demo/ExampleServerIT.java
+++ b/hapi-fhir-jpaserver-example/src/test/java/ca/uhn/fhir/jpa/demo/ExampleServerIT.java
@@ -50,7 +50,7 @@ public class ExampleServerIT {
/*
* This runs under maven, and I'm not sure how else to figure out the target directory from code..
*/
- String path = ExampleServerIT.class.getClassLoader().getResource("whereami.txt").getPath();
+ String path = ExampleServerIT.class.getClassLoader().getResource(".keep_hapi-fhir-jpaserver-example").getPath();
path = new File(path).getParent();
path = new File(path).getParent();
path = new File(path).getParent();
diff --git a/hapi-fhir-jpaserver-example/src/test/resources/.keep_hapi-fhir-jpaserver-example b/hapi-fhir-jpaserver-example/src/test/resources/.keep_hapi-fhir-jpaserver-example
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/hapi-fhir-jpaserver-example/src/test/resources/whereami.txt b/hapi-fhir-jpaserver-example/src/test/resources/whereami.txt
deleted file mode 100644
index 3707c1a3228..00000000000
--- a/hapi-fhir-jpaserver-example/src/test/resources/whereami.txt
+++ /dev/null
@@ -1 +0,0 @@
-ust used for path resolution
\ No newline at end of file
diff --git a/hapi-fhir-testpage-overlay/pom.xml b/hapi-fhir-testpage-overlay/pom.xml
index ba763222506..74e7f9db993 100644
--- a/hapi-fhir-testpage-overlay/pom.xml
+++ b/hapi-fhir-testpage-overlay/pom.xml
@@ -48,14 +48,11 @@
org.thymeleaf
thymeleaf
- ${thymeleaf-version}
org.thymeleaf
thymeleaf-spring4
- ${thymeleaf-version}
-
javax.servlet
javax.servlet-api
@@ -203,6 +200,7 @@
maven-war-plugin
true
+ false
diff --git a/hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/FhirTesterMvcConfig.java b/hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/FhirTesterMvcConfig.java
new file mode 100644
index 00000000000..c38c7f10ffc
--- /dev/null
+++ b/hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/FhirTesterMvcConfig.java
@@ -0,0 +1,60 @@
+package ca.uhn.fhir.to;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.EnableWebMvc;
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
+import org.thymeleaf.spring4.SpringTemplateEngine;
+import org.thymeleaf.spring4.view.ThymeleafViewResolver;
+import org.thymeleaf.templateresolver.ServletContextTemplateResolver;
+
+import ca.uhn.fhir.to.mvc.AnnotationMethodHandlerAdapterConfigurer;
+
+@Configuration
+@EnableWebMvc
+@ComponentScan(basePackages = "ca.uhn.fhir.to")
+public class FhirTesterMvcConfig extends WebMvcConfigurerAdapter {
+
+ @Override
+ public void addResourceHandlers(ResourceHandlerRegistry theRegistry) {
+ theRegistry.addResourceHandler("/css/**").addResourceLocations("/css/");
+ theRegistry.addResourceHandler("/fa/**").addResourceLocations("/fa/");
+ theRegistry.addResourceHandler("/fonts/**").addResourceLocations("/fonts/");
+ theRegistry.addResourceHandler("/img/**").addResourceLocations("/img/");
+ theRegistry.addResourceHandler("/js/**").addResourceLocations("/js/");
+ }
+
+ @Bean
+ public ServletContextTemplateResolver templateResolver() {
+ ServletContextTemplateResolver templateResolver = new ServletContextTemplateResolver();
+ templateResolver.setPrefix("/WEB-INF/templates/");
+ templateResolver.setSuffix(".html");
+ templateResolver.setTemplateMode("HTML5");
+ templateResolver.setCharacterEncoding("UTF-8");
+ return templateResolver;
+ }
+
+ @Bean
+ public AnnotationMethodHandlerAdapterConfigurer annotationMethodHandlerAdapterConfigurer() {
+ return new AnnotationMethodHandlerAdapterConfigurer();
+ }
+
+ @Bean
+ public ThymeleafViewResolver viewResolver() {
+ ThymeleafViewResolver viewResolver = new ThymeleafViewResolver();
+ viewResolver.setTemplateEngine(templateEngine());
+ viewResolver.setCharacterEncoding("UTF-8");
+ return viewResolver;
+ }
+
+ @Bean
+ public SpringTemplateEngine templateEngine() {
+ SpringTemplateEngine templateEngine = new SpringTemplateEngine();
+ templateEngine.setTemplateResolver(templateResolver());
+
+ return templateEngine;
+ }
+
+}
diff --git a/hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/TesterConfig.java b/hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/TesterConfig.java
index b3670ddd475..df6d7146786 100644
--- a/hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/TesterConfig.java
+++ b/hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/TesterConfig.java
@@ -1,9 +1,12 @@
package ca.uhn.fhir.to;
+import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
+import javax.annotation.PostConstruct;
+
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.Validate;
import org.springframework.beans.factory.annotation.Required;
@@ -20,6 +23,26 @@ public class TesterConfig {
private LinkedHashMap myIdToFhirVersion = new LinkedHashMap();
private LinkedHashMap myIdToServerBase = new LinkedHashMap();
private LinkedHashMap myIdToServerName = new LinkedHashMap();
+ private List myServerBuilders = new ArrayList();
+
+ public IServerBuilderStep1 addServer() {
+ ServerBuilder retVal = new ServerBuilder();
+ return retVal;
+ }
+
+ @PostConstruct
+ public void build() {
+ for (ServerBuilder next : myServerBuilders) {
+ Validate.notBlank(next.myId, "Found invalid server configuration - No ID supplied");
+ Validate.notNull(next.myVersion, "Found invalid server configuration - No FHIR version supplied");
+ Validate.notBlank(next.myBaseUrl, "Found invalid server configuration - No base URL supplied");
+ Validate.notBlank(next.myName, "Found invalid server configuration - No name supplied");
+ myIdToFhirVersion.put(next.myId, next.myVersion);
+ myIdToServerBase.put(next.myId, next.myBaseUrl);
+ myIdToServerName.put(next.myId, next.myName);
+ }
+ myServerBuilders.clear();
+ }
public ITestingUiClientFactory getClientFactory() {
return myClientFactory;
@@ -58,7 +81,7 @@ public class TesterConfig {
for (String nextRaw : servers) {
String[] nextSplit = nextRaw.split(",");
-
+
if (nextSplit.length < 3) {
throw new IllegalArgumentException("Invalid serveer line '" + nextRaw + "' - Must be comma separated");
} else if (nextSplit.length == 3) {
@@ -80,4 +103,78 @@ public class TesterConfig {
}
}
+ public interface IServerBuilderStep1 {
+
+ IServerBuilderStep2 withId(String theId);
+
+ }
+
+ public interface IServerBuilderStep2 {
+
+ IServerBuilderStep3 withFhirVersion(FhirVersionEnum theVersion);
+
+ }
+
+ public interface IServerBuilderStep3 {
+
+ IServerBuilderStep4 withBaseUrl(String theBaseUrl);
+
+ }
+
+ public interface IServerBuilderStep4 {
+
+ IServerBuilderStep5 withName(String theName);
+
+ }
+
+ public interface IServerBuilderStep5 {
+
+ IServerBuilderStep1 addServer();
+
+ }
+
+ public class ServerBuilder implements IServerBuilderStep1, IServerBuilderStep2, IServerBuilderStep3, IServerBuilderStep4, IServerBuilderStep5 {
+
+ private String myBaseUrl;
+ private String myId;
+ private String myName;
+ private FhirVersionEnum myVersion;
+
+ @Override
+ public IServerBuilderStep1 addServer() {
+ ServerBuilder retVal = new ServerBuilder();
+ myServerBuilders.add(retVal);
+ return retVal;
+ }
+
+ @Override
+ public IServerBuilderStep4 withBaseUrl(String theBaseUrl) {
+ Validate.notBlank(theBaseUrl, "theBaseUrl can not be blank");
+ myBaseUrl = theBaseUrl;
+ return this;
+ }
+
+ @Override
+ public IServerBuilderStep3 withFhirVersion(FhirVersionEnum theVersion) {
+ Validate.notNull(theVersion);
+ myVersion = theVersion;
+ return this;
+ }
+
+ @Override
+ public IServerBuilderStep2 withId(String theId) {
+ Validate.notBlank(theId, "theId can not be blank");
+ myId = theId;
+ return this;
+ }
+
+ @Override
+ public IServerBuilderStep5 withName(String theName) {
+ Validate.notBlank(theName, "theName can not be blank");
+ myName = theName;
+ return this;
+ }
+
+ }
+
}
diff --git a/hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/mvc/AnnotationMethodHandlerAdapterConfigurer.java b/hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/mvc/AnnotationMethodHandlerAdapterConfigurer.java
index 38a00b79c23..63fd0e56718 100644
--- a/hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/mvc/AnnotationMethodHandlerAdapterConfigurer.java
+++ b/hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/mvc/AnnotationMethodHandlerAdapterConfigurer.java
@@ -1,5 +1,7 @@
package ca.uhn.fhir.to.mvc;
+import javax.annotation.PostConstruct;
+
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter;
@@ -7,6 +9,7 @@ public class AnnotationMethodHandlerAdapterConfigurer {
@Autowired
private RequestMappingHandlerAdapter adapter;
+ @PostConstruct
public void init() {
adapter.setWebBindingInitializer(new ToBindingInitializer());
}
diff --git a/hapi-fhir-testpage-overlay/src/main/webapp/WEB-INF/hapi-fhir-tester-config.xml b/hapi-fhir-testpage-overlay/src/main/webapp/WEB-INF/hapi-fhir-tester-config.xml
deleted file mode 100644
index c0fb3ef2ed0..00000000000
--- a/hapi-fhir-testpage-overlay/src/main/webapp/WEB-INF/hapi-fhir-tester-config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
- home , DSTU1 , Localhost Server DSTU1 , http://localhost:8887/fhir/contextDstu1
- home_d2 , DSTU2 , Localhost Server DSTU2 , http://localhost:8887/fhir/contextDstu2
- hi , DSTU1 , Health Intersections , http://fhir.healthintersections.com.au/open
- furore , DSTU1 , Spark - Furore Reference Server , http://spark.furore.com/fhir
- blaze , DSTU1 , Blaze (Orion Health) , https://fhir.orionhealth.com/blaze/fhir
- oridashi , DSTU1 , Oridashi , http://demo.oridashi.com.au:8190
- fhirbase , DSTU1 , FHIRPlace (Health Samurai) , http://try-fhirplace.hospital-systems.com/
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/hapi-fhir-testpage-overlay/src/main/webapp/WEB-INF/web.xml b/hapi-fhir-testpage-overlay/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 63e8889c723..00000000000
--- a/hapi-fhir-testpage-overlay/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
- org.springframework.web.context.ContextLoaderListener
-
-
-
- contextConfigLocation
-
- /WEB-INF/hapi-fhir-tester-application-context.xml
- /WEB-INF/hapi-fhir-tester-config.xml
-
-
-
-
-
- spring
- org.springframework.web.servlet.DispatcherServlet
-
- contextConfigLocation
-
- /WEB-INF/hapi-fhir-tester-application-context.xml
- /WEB-INF/hapi-fhir-tester-config.xml
-
-
- 1
-
-
-
- spring
- /
-
-
-
-
- *.jsp
- true
-
-
-
-
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 96340a6dbd0..1f35f6c4c54 100644
--- a/pom.xml
+++ b/pom.xml
@@ -233,7 +233,7 @@
1.1.8
2.7.1
4.3.6
- 4.2.1.RELEASE
+ 4.2.2.RELEASE
2.1.4.RELEASE
1.0.1
1.6
@@ -333,7 +333,7 @@
org.apache.commons
commons-lang3
- 3.3.2
+ 3.4
org.apache.derby
@@ -575,6 +575,11 @@
thymeleaf
${thymeleaf-version}
+
+ org.thymeleaf
+ thymeleaf-spring4
+ ${thymeleaf-version}
+
xmlunit
xmlunit
@@ -626,7 +631,7 @@
org.codehaus.plexus
plexus-compiler-javac-errorprone
- 2.5
+ 2.6
@@ -1312,7 +1317,7 @@
org.codehaus.mojo
findbugs-maven-plugin
- 3.0.0
+ 3.0.2
./hapi-fhir-base/target/classes
diff --git a/restful-server-example/pom.xml b/restful-server-example/pom.xml
index aa9dccc6af2..3a1483d0998 100644
--- a/restful-server-example/pom.xml
+++ b/restful-server-example/pom.xml
@@ -52,6 +52,13 @@
war
provided
+
+ ca.uhn.hapi.fhir
+ hapi-fhir-testpage-overlay
+ 1.3-SNAPSHOT
+ classes
+ provided
+
-
-
-
-
-
-
- example , DSTU1 , Restful Server Example , http://localhost:8080/fhir
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/restful-server-example/src/main/webapp/WEB-INF/web.xml b/restful-server-example/src/main/webapp/WEB-INF/web.xml
index 88020ad1d40..319bfa280f1 100644
--- a/restful-server-example/src/main/webapp/WEB-INF/web.xml
+++ b/restful-server-example/src/main/webapp/WEB-INF/web.xml
@@ -1,26 +1,20 @@
-
-
- org.springframework.web.context.ContextLoaderListener
-
-
- contextConfigLocation
-
- /WEB-INF/hapi-fhir-tester-application-context.xml
- /WEB-INF/hapi-fhir-tester-config.xml
-
-
+
spring
org.springframework.web.servlet.DispatcherServlet
+
+ contextClass
+ org.springframework.web.context.support.AnnotationConfigWebApplicationContext
+
contextConfigLocation
-
- /WEB-INF/hapi-fhir-tester-application-context.xml
- /WEB-INF/hapi-fhir-tester-config.xml
-
+ ca.uhn.example.config.FhirTesterConfig
2
@@ -29,7 +23,23 @@
/tester/*
-
+
+
+ fhirServlet
+ ca.uhn.example.servlet.ExampleRestfulServlet
+ 1
+
+
+ fhirServlet
+ /fhir/*
+
+
+
CORS Filter
org.ebaysf.web.cors.CORSFilter
@@ -74,16 +84,4 @@
/*
-
-
-
- fhir
- ca.uhn.example.servlet.ExampleRestfulServlet
-
-
- fhir
- /fhir/*
-
-
-
\ No newline at end of file
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 4c7fe9e42cc..17f868d19e7 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -12,7 +12,8 @@
latest versions (dependent HAPI modules listed in brackets):
- Springframework (JPA, Web Tester): 4.1.5 -> 4.2.1
+ Commons-lang3 (Core): 3.3.2 -> 3.4
+ Springframework (JPA, Web Tester): 4.1.5 -> 4.2.2
Hibernate (JPA, Web Tester): 4.2.17 -> 5.0.2
Hibernate Validator (JPA, Web Tester): 5.2.1 -> 5.2.2
Derby (JPA, CLI, Public Server): 10.11.1.1 -> 10.12.1.1