diff --git a/README.md b/README.md index 6bc5789f8dc..94fee838218 100644 --- a/README.md +++ b/README.md @@ -193,14 +193,14 @@ The easiest way to run this server entirely depends on your environment requirem ### Using jetty ```bash -mvn jetty:run +mvn -Pjetty jetty:run ``` If you need to run this server on a different port (using Maven), you can change the port in the run command as follows: ```bash -mvn -Djetty.port=8888 jetty:run +mvn -Pjetty -Djetty.port=8888 jetty:run ``` Server will then be accessible at http://localhost:8888/ and eg. http://localhost:8888/fhir/metadata. Remember to adjust you overlay configuration in the application.yaml to eg. diff --git a/pom.xml b/pom.xml index f750d54b05c..1b8fee45e9a 100644 --- a/pom.xml +++ b/pom.xml @@ -601,6 +601,9 @@ boot + + true + org.springframework.boot diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/Application.java b/src/main/java/ca/uhn/fhir/jpa/starter/Application.java index 9131f8dc9ef..4f72c4a976d 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/Application.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/Application.java @@ -53,10 +53,6 @@ public static void main(String[] args) { // UI is now accessible at http://localhost:8080/ } - @Override - protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { - return builder.sources(Application.class); - } @Autowired AutowireCapableBeanFactory beanFactory; @@ -73,26 +69,4 @@ public ServletRegistrationBean hapiServletRegistration(RestfulServer restfulServ return servletRegistrationBean; } - @Bean - public ServletRegistrationBean overlayRegistrationBean() { - - AnnotationConfigWebApplicationContext annotationConfigWebApplicationContext = - new AnnotationConfigWebApplicationContext(); - annotationConfigWebApplicationContext.register(FhirTesterConfig.class); - - DispatcherServlet dispatcherServlet = new DispatcherServlet(annotationConfigWebApplicationContext); - dispatcherServlet.setContextClass(AnnotationConfigWebApplicationContext.class); - dispatcherServlet.setContextConfigLocation(FhirTesterConfig.class.getName()); - - ServletRegistrationBean registrationBean = new ServletRegistrationBean(); - registrationBean.setServlet(dispatcherServlet); - registrationBean.addUrlMappings("/*"); - registrationBean.setLoadOnStartup(1); - return registrationBean; - } - - // @Bean - // IRepositoryFactory repositoryFactory(DaoRegistry theDaoRegistry, RestfulServer theRestfulServer) { - // return rd -> new HapiFhirRepository(theDaoRegistry, rd, theRestfulServer); - // } }