0

First of all, I'm pretty new in the area of Java Web Development.

I'm working on a small project with Dropwizard. I want to use JDBI to interact with my Database. However, I cannot import the DataSourceFactory. I'm using Maven. From what I read I thought the JDBI module is one of the core modules. I tried adding the dependency explicitly, DataSourceFactory is still not found tho. These are my dependencies:

    <dependencies>
        <dependency>
            <groupId>io.dropwizard</groupId>
            <artifactId>dropwizard-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>jakarta.validation</groupId>
            <artifactId>jakarta.validation-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate.validator</groupId>
            <artifactId>hibernate-validator</artifactId>
        </dependency>
        <dependency>
            <groupId>io.dropwizard</groupId>
            <artifactId>dropwizard-jdbi3</artifactId>
            <version>2.1.2</version>
        </dependency>
    </dependencies>

Hope one of you can help me out.

Thanks in advance!

Best

1 Answers1

0

You also need to add the database dependency:

<dependency>
    <groupId>io.dropwizard</groupId>
    <artifactId>dropwizard-db</artifactId>
    <version>2.1.2</version>
</dependency>