agoncal / agoncal-fascicle-quarkus Goto Github PK
View Code? Open in Web Editor NEWCode of my fascicle "Understanding Quarkus"
License: MIT License
Code of my fascicle "Understanding Quarkus"
License: MIT License
In chapter 3.6 the native image returns an empty json with "curl http://localhost:8080/artists | jq"
I have added the annotation "@RegisterForReflection" to the Artist class, as described in the documentation https://quarkus.io/guides/writing-native-applications-tips#registering-for-reflection
The Json is then not empty anymore
I started building agoncal-fascicle-quarkus/getting-started
project. The quarkus:dev
and getting-started-1.0-SNAPSHOT-runner.jar
works perfectly fine and getting following response for http://localhost:8080/artists
[
{
"first_name": "John",
"last_name": "Lennon"
},
{
"first_name": "Paul",
"last_name": "McCartney"
},
{
"first_name": "George",
"last_name": "Harrison"
},
{
"first_name": "Ringo",
"last_name": "Starr"
}
]
However, when I build the native image and run that JSON bodies are not returning correctly.
Steps:
./mvnw package -Pnative
curl http://localhost:8080/artists | jq
Actual response:
[
{},
{},
{},
{}
]
Expected response:
[
{
"first_name": "John",
"last_name": "Lennon"
},
{
"first_name": "Paul",
"last_name": "McCartney"
},
{
"first_name": "George",
"last_name": "Harrison"
},
{
"first_name": "Ringo",
"last_name": "Starr"
}
]
Environment details:
Ubuntu 20.10 - Kernal 5.8.0-41-generic
openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment GraalVM CE 21.0.0 (build 11.0.10+8-jvmci-21.0-b06)
OpenJDK 64-Bit Server VM GraalVM CE 21.0.0 (build 11.0.10+8-jvmci-21.0-b06, mixed mode, sharing)
agoncal/hello-fascicle image does not exist in dockerhub, therefore the deployment step in book Undestanding Quarkus fails...
At book page 345, Listing 277 is not "POJO with Bean Validation and JSON-B Annotations", it is the BookResource code.
Hi,
In page 76 of Understanding Quarkus you wrote:
Qualifiers let you choose between multiple implementations of an interface at development time.
I am wondering what to do if I need to choose between two implementations at runtime?
PS: The book is amazing.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.