Integration and example code.
Warning
|
Work in progress. Katharsis-Vertx API is not stable yet as we do not support all use cases. Expect change. |
We deploy on https://bintray.com . You find detailed descriptions on how to consume this library on the project page
https://bintray.com/netdava/maven/katharsis-vertx/ . Press Set me up
button.
dependencies { compile 'io.katharsis:katharsis-vertx:<version>' }
Router katharsisRouter = KatharsisRestApi.createRouter(vertx, "package.to.scan", "/api"); router.mountSubRouter("/api/projects", katharsisRouter); router.mountSubRouter("/api/tasks", katharsisRouter);
ParameterProviderFactory factory = new SpringParameterProviderFactory(Json.mapper, context); KatharsisHandlerFactory katharsisGlue = KatharsisHandlerFactory.create(Main.class.getPackage().getName(), "/api", Json.mapper, factory); Router katharsisRouter = KatharsisRestApi.createRouter(vertx, katharsisGlue); router.mountSubRouter("/api/projects", katharsisRouter); router.mountSubRouter("/api/tasks", katharsisRouter);
The project uses Gradle as a build tool.
git clone [email protected]:katharsis-project/katharsis-vertx.git ./gradlew build
After building and running the commands bellow visit http://localhost:8080/api/projects or http://localhost:8080/api/tasks".
Run these commands:
The simple example uses Katharsis inheritance API.
./gradlew :examples:simple:run
The spring example uses a simple SpringFramework integration.
./gradlew :examples:spring:run
Currently we release to https://bintray.com . We use https://github.com/ajoberstar/gradle-git plugin to manage releases in git as tags.
Add bintrayUser
and bintrayApiKey
to your ~/.gradle/gradle.properties
file and run the bellow command:
./gradlew release -Prelease.scope=patch -Prelease.stage=final