Jooby2 with JDBI3

16 views
Skip to first unread message

niko...@brightminds.org

unread,
Jan 18, 2021, 7:39:35 PM1/18/21
to jooby-project
Hello,

Has anyone gotten JDBI3 to work with Jooby2 and if so could provide a small sample on how to initialize?

The following sample project is excellent and includes JDBI3 but is unfortunately for Jooby1 and would be helpful if I can just beyond the initialization phase:

Thanks in Advance,

--Nikolaos

niko...@brightminds.org

unread,
Jan 19, 2021, 12:26:49 PM1/19/21
to jooby-project
Thanks István Mészáros <contact....@gmail.com> for pointing out:

I had definitely reviewed that documentation.  What is missing is that there is no mention of JDBI3 in the page.
However, digging deeper yesterday I found that JDBI3 is inherently included in the JdbiModule (see imports below).

Just a suggestion:  
It might be a good idea to mention automatic/included JDBI3 support in the Jooby v2 docs since in Jooby v1 you needed to explicitly load both JDBI and JDBI3.

Thank You,

--Nikolaos

package io.jooby.jdbi;

import io.jooby.Extension;
import io.jooby.Jooby;
import io.jooby.ServiceKey;
import io.jooby.ServiceRegistry;
import io.jooby.internal.jdbi.HandleProvider;
import io.jooby.internal.jdbi.SqlObjectProvider;
...
import org.jdbi.v3.core.Handle;
import org.jdbi.v3.core.Jdbi;

public class JdbiModule implements Extension {
Reply all
Reply to author
Forward
0 new messages