Using hikari + ormlite

classic Classic list List threaded Threaded
3 messages Options
JP
Reply | Threaded
Open this post in threaded view
|

Using hikari + ormlite

JP
New to ratpack, I've got a basic server going with mariadb + hikari, seems to work.

I'd like to use an orm, say ormlite, what's the best way I'd go about doing such a thing? Still wrapping my head around ratpack in general, any help would be amazing, thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Using hikari + ormlite

danhyun
The good thing about ormlite is that it's just a simple library. As long as you provide a connection url or datasource you can begin using it in any java app.

Ratpack is also just a simple library.

I've put together a quick sample for you using Ratpack, Groovy, hikari, h2 https://github.com/danhyun/ratpack-ormlite-demo

You should be able to take this demo and swap out the appropriate parts to get mariadb working.
JP
Reply | Threaded
Open this post in threaded view
|

Re: Using hikari + ormlite

JP
Cool thanks! I'll convert this to the Java ratpack server I have tonight and let you know how it goes.