Cleaned up for running boot as default (#620)
This commit is contained in:
committed by
GitHub
parent
0be636c169
commit
9c557e2c80
@@ -193,14 +193,14 @@ The easiest way to run this server entirely depends on your environment requirem
|
|||||||
|
|
||||||
### Using jetty
|
### Using jetty
|
||||||
```bash
|
```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:
|
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
|
```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.
|
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.
|
||||||
|
|||||||
3
pom.xml
3
pom.xml
@@ -601,6 +601,9 @@
|
|||||||
<!-- Use the boot profile for development and debugging options when using your IDE -->
|
<!-- Use the boot profile for development and debugging options when using your IDE -->
|
||||||
<profile>
|
<profile>
|
||||||
<id>boot</id>
|
<id>boot</id>
|
||||||
|
<activation>
|
||||||
|
<activeByDefault>true</activeByDefault>
|
||||||
|
</activation>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
|||||||
@@ -53,10 +53,6 @@ public class Application extends SpringBootServletInitializer {
|
|||||||
// UI is now accessible at http://localhost:8080/
|
// UI is now accessible at http://localhost:8080/
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
|
|
||||||
return builder.sources(Application.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
AutowireCapableBeanFactory beanFactory;
|
AutowireCapableBeanFactory beanFactory;
|
||||||
@@ -73,26 +69,4 @@ public class Application extends SpringBootServletInitializer {
|
|||||||
return servletRegistrationBean;
|
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);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user