Cleaned up for running boot as default (#620)

This commit is contained in:
Jens Kristian Villadsen
2023-12-05 19:56:31 +01:00
committed by GitHub
parent 0be636c169
commit 9c557e2c80
3 changed files with 5 additions and 28 deletions

View File

@@ -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.

View File

@@ -601,6 +601,9 @@
<!-- Use the boot profile for development and debugging options when using your IDE -->
<profile>
<id>boot</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>

View File

@@ -53,10 +53,6 @@ public class Application extends SpringBootServletInitializer {
// 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 class Application extends SpringBootServletInitializer {
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);
// }
}