Dennis Schröder
05/09/2021, 11:48 AMinterface ProductDAO : JpaRepository<ProductDTO, UUID>
That I would like to instantiate manually so I can register it via the beans Kotlin DSL like this:
fun beanDeclarations() = beans {
bean<ProductDAO>()
bean<ProductRepository> {
ProductJPARepository(ref())
}
bean<ProductApplicationService> {
ProductApplicationServiceImpl(ref())
}
}
Could find anything in the interweb … @sdeleuzekqr
05/09/2021, 2:08 PMJpaRepositoryFactory(entityManager).getRepository(ProductDAO.class)
nfrankel
05/09/2021, 5:40 PMref()
as it’s already part of the contextDennis Schröder
05/09/2021, 6:34 PMProductDAO
with @Repository
? And is there a way to do it without the annotation if so?Luca Piccinelli
05/20/2021, 5:19 AM