项目作者: Shyndard

项目描述 :
Sample projet to test native build of Quarkus with GraalVM
高级语言: Java
项目地址: git://github.com/Shyndard/sample-quarkus-restapi.git
创建时间: 2020-12-07T22:55:02Z
项目社区:https://github.com/Shyndard/sample-quarkus-restapi

开源协议:

下载


sample-quarkus-restapi project

This is a sample project which uses Quarkus framework and Oracle GraamVM CE.

Running the application in dev mode

You can run your application in dev mode that enables live coding using:

  1. ./mvnw quarkus:dev

Packaging and running the application

Package project

  1. ./mvnw package

Run application

  1. java -jar target/*-runner.jar

Add param ‘-Pnative’ to build a native executable ( + add ‘-Dquarkus.native.container-build=true’ if you don’t have GraalVM installed)

Creating a docker native image with GraalVM (with build step)

  1. docker build -t sample-quarkus-restapi .

and then run it with

  1. docker run -i --rm -p 8080:8080 -e PORT=8080 sample-quarkus-restapi

See https://quarkus.io/guides/building-native-image for more details.