|
| 1 | +# jigsaw-puzzle |
| 2 | + |
| 3 | +This project uses Quarkus, the Supersonic Subatomic Java Framework. |
| 4 | + |
| 5 | +If you want to learn more about Quarkus, please visit its website: <https://quarkus.io/>. |
| 6 | + |
| 7 | +## Running the application in dev mode |
| 8 | + |
| 9 | +You can run your application in dev mode that enables live coding using: |
| 10 | + |
| 11 | +```shell script |
| 12 | +./mvnw quarkus:dev |
| 13 | +``` |
| 14 | + |
| 15 | + |
| 16 | +curl -X POST http://localhost:8080/api/jigsaw/generate \ |
| 17 | + -F "image=@myimage.png" \ |
| 18 | + -F "rows=4" \ |
| 19 | + -F "cols=6" \ |
| 20 | + --output puzzle.png |
| 21 | + |
| 22 | + |
| 23 | +> **_NOTE:_** Quarkus now ships with a Dev UI, which is available in dev mode only at <http://localhost:8080/q/dev/>. |
| 24 | +
|
| 25 | +## Packaging and running the application |
| 26 | + |
| 27 | +The application can be packaged using: |
| 28 | + |
| 29 | +```shell script |
| 30 | +./mvnw package |
| 31 | +``` |
| 32 | + |
| 33 | +It produces the `quarkus-run.jar` file in the `target/quarkus-app/` directory. |
| 34 | +Be aware that it’s not an _über-jar_ as the dependencies are copied into the `target/quarkus-app/lib/` directory. |
| 35 | + |
| 36 | +The application is now runnable using `java -jar target/quarkus-app/quarkus-run.jar`. |
| 37 | + |
| 38 | +If you want to build an _über-jar_, execute the following command: |
| 39 | + |
| 40 | +```shell script |
| 41 | +./mvnw package -Dquarkus.package.jar.type=uber-jar |
| 42 | +``` |
| 43 | + |
| 44 | +The application, packaged as an _über-jar_, is now runnable using `java -jar target/*-runner.jar`. |
| 45 | + |
| 46 | +## Creating a native executable |
| 47 | + |
| 48 | +You can create a native executable using: |
| 49 | + |
| 50 | +```shell script |
| 51 | +./mvnw package -Dnative |
| 52 | +``` |
| 53 | + |
| 54 | +Or, if you don't have GraalVM installed, you can run the native executable build in a container using: |
| 55 | + |
| 56 | +```shell script |
| 57 | +./mvnw package -Dnative -Dquarkus.native.container-build=true |
| 58 | +``` |
| 59 | + |
| 60 | +You can then execute your native executable with: `./target/jigsaw-puzzle-1.0.0-SNAPSHOT-runner` |
| 61 | + |
| 62 | +If you want to learn more about building native executables, please consult <https://quarkus.io/guides/maven-tooling>. |
| 63 | + |
| 64 | +## Related Guides |
| 65 | + |
| 66 | +- REST Jackson ([guide](https://quarkus.io/guides/rest#json-serialisation)): Jackson serialization support for Quarkus REST. This extension is not compatible with the quarkus-resteasy extension, or any of the extensions that depend on it |
| 67 | + |
| 68 | +## Provided Code |
| 69 | + |
| 70 | +### REST |
| 71 | + |
| 72 | +Easily start your REST Web Services |
| 73 | + |
| 74 | +[Related guide section...](https://quarkus.io/guides/getting-started-reactive#reactive-jax-rs-resources) |
0 commit comments