I have an existing war project created using spring boot. How to package it within an EAR which has an EJB module?
Is there any way to move the model and dao package
You have to use the dependency management system.
It allows you to set the parent of Spring Boot WAR
module project to the different from the spring-boot-starter-parent
. Then it's would be possible to include the WAR
project into the EAR
one in the same way like any other.
org.springframework.boot
spring-boot-dependencies
1.5.2.RELEASE
pom
import
... now you can use all the Spring Boot starter dependencies in the usual way:
org.springframework.boot
spring-boot-starter-web
org.springframework.boot
spring-boot-starter-data-jpa
The starter dependencies you've to specify at the module projects level, while the dependency management configuration may be specified at the both ones - around the whole EAR
projects or individually on each of them, depending on the app requirements.
Using Spring Boot without the parent POM