Skip to content

tryptichon/java11-jakarta-rs-swagger-redoc-demoWS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DEMO WS

An Jakarta-JAX-RS skeleton webapp using:

  • Jakarta-JAX-RS with annotations.
  • Swagger annotations for automatic openapi.json/.yaml generation.
  • ReDoc standalone to generate a documentation website for the api.
  • Docker to create a self-contained image using tomcat 10.

Best to be used with IntelliJ IDEA and Java 11.

Handling docker images

Using maven to handle docker image creation and cleanup is done by just activating the profile docker. This can be activated via -Ddocker=true on the commandline.

Create a docker image:

mvn package -Ddocker=true

Cleanup and remove the docker image:

mvn clean -Ddocker=true

See pom.xml on how this is done.

A sample docker-compose.yaml is included to start a container easily. The parameter image there needs to be adjusted by hand when the project name / version changes.

After the container has started, point your browser to http://localhost:8080/.

Used tools and licenses

For more information about swagger and additional licenses:

Swagger

ReDoc

Docker

Tomcat