Reputation: 51
I am using JOOQ with Kotlin, Spring and PostgreSQL. I'm able to run JOOQ generator and query data. The problem is that I am not able to inject DSLcontext in repository class constructor.
It throws following exception:
Field dslContext
in someRepository required a bean of type org.jooq.DSLContext
that could not be found.
Injection looks like this:
@Repository
class SomeRepositoryImpl(private val dslContext: DSLContext): SomeRepository
{
}
Cheers, Ondrej
Upvotes: 2
Views: 974
Reputation: 51
I had a wrong configuratuion as Lukas Eder pointed out. It starts to work after I've added following dependency to pom.xml file:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jooq</artifactId>
</dependency>
Thanks for your help, Ondrej
Upvotes: 2