I'm trying to implement a crud controller using a generic repository interface like this:
The problem is that @Inject JpaRepository<T, ID> is not resolved:
org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [JpaRepository<Projeto, Integer>] with qualifiers [@Default] at injection point [[field] @Inject private CrudController.repository]
I have a similar implementation with a concret class (without spring-data) that works in this scenario. This is a limitation of proxy mechanism of spring-data or I'm missing something?
Code:
public interface ProjetoRepository extends JpaRepository<Projeto, Integer>, Serializable {
}
public abstract class CrudController<T, ID extends Serializable> implements Serializable {
@Inject
private JpaRepository<T, ID> repository;
}
@Model
@ConversationScoped
public class ProjetoCrudController extends CrudController<Projeto, Integer> {
public ProjetoCrudController() {
super(Projeto.class);
}
}
org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [JpaRepository<Projeto, Integer>] with qualifiers [@Default] at injection point [[field] @Inject private CrudController.repository]
I have a similar implementation with a concret class (without spring-data) that works in this scenario. This is a limitation of proxy mechanism of spring-data or I'm missing something?