quarkus-reactive-programming-20220617

Quarkus playground application with reactive APIs using RESTEasy Reactive


  • Use this page to view all available API endpoints.
  • Creates two MySQL database instances, running on different ports.
    • By default, the port each database is created on is dynamically chosen at runtime.
    • You will need to check the console log for ports the app creates the databases on.
    • Edit /src/main/resources/application.properties if you want to use static database ports.

  • For example, if I submit this GET request:

    http://localhost:7332/potato-type/name/Adirondack Blue
    

    The PotatoTypeReadOnlyRepository class’ getPotatoTypeByName() method successfully submits a SQL query & returns a PotatoType object, which is then returned as the API response body.

    However, if I submit this GET request:

    http://localhost:7332/potato-type/name/Adirondack Blue/reactive
    

    The API endpoint returns a HTTP 500 response, because the PotatoTypeReadOnlyRepository class’ getPotatoTypeByNameReactive() method code is written incorrectly. Which is 100% my fault — but I can’t figure out what the “correct” reactive code should look like.

    GitHub

    View Github