A simple REST service built with Quarkus that reads and serves text content from classpath resources.
This application provides a REST endpoint that reads and returns the contents of a text file (my-data.txt) from the classpath. It's designed as a simple demonstration of resource handling in a Quarkus application.
- REST endpoint at
/resourcethat returns text content - Handles resource loading from the classpath
- Provides proper error handling for missing resources
- Built with Quarkus for cloud-native deployment
Run the application in development mode with live coding enabled:
./mvnw quarkus:devThe application will be available at http://localhost:8080/resource.
To build the application:
./mvnw packageRun the packaged application:
java -jar target/quarkus-app/quarkus-run.jarCreate a native executable:
./mvnw package -DnativeOr build in a container:
./mvnw package -Dnative -Dquarkus.native.container-build=true- Built with Quarkus, the Supersonic Subatomic Java Framework
- Uses REST Jackson for JSON serialization
- Implements proper resource handling with error management
- Supports both development and production deployment modes
For more information about Quarkus, visit: https://quarkus.io/
- REST Jackson (guide): 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
Easily start your REST Web Services