Adapt service without Web API
In this tutorial we create a page: http://localhost:8092/content/local/books.html displaying books and authors that are available in a relational database.
Database access is not available via WebAPI thus we have 2 options:
- Implement a Web API layer to access the database and then integrate with it using e.g. AJAX or an HTTP adapter.
- Implement a Knot.x Service Adapter.
For the demonstration purposes we're going to use HSQL database in this example.
Follow this tutorial
in order to set up the database.
To create tables with data use the script provided in
db folder of this tutorial.
To run this tutorial you will need Java 8 and Maven installed.
appfolder in this tutorial root.
- Build custom service adapter using
mvn clean installcommand.
targetfolder after successful maven build) to
run.shto start Knot.x instance with custom adapter.