The is the base reusable implementation for Spark Micro Web Java type tech stacks used to create a complete Java web app using the lightweight Spark Micro Web Framework
The stack includes:
- This framework is a great alternative to heavier Java frameworks like Spring or Strut2, and is great solution for microservices implementations.
- An object–relational mapping tool for the Java programming language. It provides a framework for mapping an object-oriented domain model to a relational database
- Unit testing framework for Java
Along with what is supported by the parent tech stack (.java.tech.stack)
, the following are overridden and additional capabilities:
- A customer pom.xml to invoke Spark via Maven plugin
- A customer Dockerfile with entrypoint.sh to execute the generated app as an Uber jar file.
- App Controller:
- Singleton used to handle application routing according to Spark requirements.
If using a CI/CD platform such as CircleCI, AWS Codebuild, Jenkins, etc.., it is best to refer to the Pipeline YAML file generated for that platform.
If not using a CI/CD platform refer to the instructions below on how to use the generated project.
To get started manually
In the root directory of the generated project is a generated Maven pom.xml file that contains the declarations and dependencies to run the application within the Spark container.
mvn clean install
By default, Spark listens on port 4567, accessible through the browser via: