Sample application showing how htmx teams up with javalin so i can compare with this one
- java 17 or newer
- kotlin 1.9
- jdbi 3.44
- htmx 2.x
- apache velocity 2.3
- spock 2.3
A good kotlin ide is also recommended.
We have shadow jar plugin to ease runnable jar creation
./gradlew shadowJar
We have application plugin to ease runnable jar creation options
./gradlew run
Alternatively, run the jar built in previous step:
java -jar build/libs/sample-htmx-javalin-1.0-SNAPSHOT-all.jar
- Shadow plugin does similar job done by maven shade plugin
- Javalin supports a good range of template engines, just pick one
- There are a good amount of logging options to Javalin
- Testing Javalin is simple and ergonomic thanks to its testing library
- Spock demands us to enable the groovy language in the project
- Groovy support has issues to proper set jvm toolchain, fallbacks to system
- There is a nice htmx plugin for intellij
- JDBI fluent api makes database access easier
- TodoItem needs an empty constructor so JDBI bean mapper can fill attributes in
- Intellij coverage plugin has an issue with velocity
- JaCoCo plugin just works even the test source set being multilingual
- Add a filter in the template. Backend already supports the 'q' parameter
- Find a good form to object mapper would be handy. Javalin has validators but besides that, form to model mapping is pretty much manual
- Setup docker image building and registry publishing