Skip to content

jdandrews/springdoc-openapi-spring-boot-2-webflux

Repository files navigation

Using OpenAPI 3 with GraalVM Native Image

Pre-requisites

  • GraalVM 22.2.0 / JDK 11
  • Swagger UI

Building Executable JAR

To create an executable jar, execute:

 mvn clean package

or

./gradlew clean build

Running the JAR application

java -jar target/springdoc-openapi-demo-3.1.6-SNAPSHOT-spring-boot.jar

or

java -jar build/libs/springdoc-openapi-demo-3.1.6-SNAPSHOT.jar

Building native image with GraalVM

To create a native image, execute the following command

mvn package -Pnative

or

./gradlew nativeCompile

Running the native application

To run the demo, execute the following:

target/springdoc-openapi-demo

or

build/native/nativeCompile/springdoc-openapi-demo

Start the Swagger UI

docker run --rm -p 80:8080 swaggerapi/swagger-ui

Open the Swagger UI by browsing to http://localhost:8082/

About

A copy of one of the springdoc demos, exploring GraalVM native compilation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages