DInject has moved to avaje.io/http - taking you there now ...

Getting started with Maven

Add dinject and dinject-controller dependencies.



Java APT

For Java we add the APT Annotation processors dinject-generator and javalin-generator. We typically use provided scope for these APT processors.

io.dinject dinject-generator 2.2 provided io.dinject javalin-generator 1.18 provided

Kotlin KAPT

For use with Kotlin we register both javalin-generator and dinject-generator as a KAPT processors to the Kotlin compiler.

The easiest way to do this is to add the io.avaje.kapt maven tiles for compile, dinject-generator and javalin-generator in build / plugins like:

io.repaint.maven tiles-maven-plugin 2.17 true io.avaje.kapt:compile:1.1 io.avaje.kapt:dinject-generator:1.1 io.avaje.kapt:javalin-generator:1.1

With Kotlin KAPT the source code isn't generated automatically on compile (as it is with Java) but instead we can specify the source code to be re-generated via:

Maven - Project - Right mouse - Generate Sources and update folders