Example implementation with Helidon
As we have used the MicroProfile annotations only, exactly the same ProductResource
class code that was used with Quarkus works with Helidon, too.
Instead of the Panache repository-based data persistence implementation used with Quarkus, we use the EntityManager
interface of the Jakarta Persistence (JPA) specification directly.
Obviously, compared to the Quarkus implementation, we had to put different dependencies in the pom.xml
file, and we used different configuration files, too.
The application is built with this Maven command:
./mvnw package
Then we can start the application JAR file:
java -jar target/product-api-helidon.jar
Of course, the API of the running application will behave the same way as the other implementations, so it can be tested with the same curl
commands.
Thanks to the MicroProfile OpenAPI compliance and Helidon OpenAPI UI module, when these dependencies are in our pom.xml
file, we can see the...