Java Spring Boot: Support Spring Boot WAR files

Context

The initial implementation will support Spring Boot Executable Jar artifacts. This extends that support to Spring Boot Executable WAR artifacts.

Implementation

The primary difference between Spring Boot Jars and WARs is that the former contain everything necessary to run the application (except for the Java runtime), while the latter are designed to be deployed into a container which may provide some needed dependencies (typically Java EE components, including the servlet implementation, and possibly more).

Since we intend to prevent user code from running (#382768), the fact that some dependencies might be missing from the artifact should be OK. Controller beans are scanned for metadata to create the OpenAPI doc; no beans need to be created, so missing dependencies will not cause a problem.

We should add scenario and acceptance tests for WAR files; there should be no need for additional unit tests unless we discover that we need to make implementation changes after all.

  • Add a scenario test for WAR files
  • Add at least one acceptance test for WAR files
    • We will eventually have a large number of variations of supported scenarios; running all other supported permutations with WAR files could explode the length of the pipeline. Given that previous testing stages should be providing the confidence that the application works, the goal at the acceptance stage should be demonstrating that it works, not trying to provide full coverage.
Edited Nov 15, 2022 by David Nelson
Assignee Loading
Time tracking Loading