At work we have a set of
JEE projects that we need to migrate to Spring Boot. Unfortunately it can't be a "big bang" but we have to do them one at a time. I've already figured out quite a lot, but there is one thing I haven't found a solution for yet.
We have two EAR projects that include two shared WAR projects. Inside these WAR projects we have some JSPs that use expressions that use an application scoped bean that is defined in another WAR or EJB JAR inside the same EAR. The two EAR projects provide different values inside the bean. A basic layout:
- EAR
- WAR / EJB JAR that provides a @ApplicationScoped bean.
- first shared WAR that uses the above bean in JSPs.
- second shared WAR that uses the above bean in JSPs.
- other stuff.
In JEE this works just fine, but I have no idea how I should do this in Spring Boot. I have thought about just deploying the shared WARs in the embedded
Tomcat container, but that would mean they would not have access to the application scoped bean.
Can anybody help me with a solution for this problem? Keep in mind that we need to support the old and new solution at the same time for at least a few weeks because we can't migrate the 4 projects in one go.