I'm trying to understand how I must configurate my application for using a CrudRepository<T,Long>, QuerydslPredicateExecutor<T> Interface to create a Bean and the implementation class on the run time.
I'm using Java 10 with Spring JPA, Hibernate, Spring MVC and an Oracle 11G XE Database. I had no problems when I was mapping actual tables. It was very easy, but I wanted to use QueryDSL mapped on a view instead of a table. I've seen many example on the web where the writers simply just create the CrudRepository<T,Long>, QuerydslPredicateExecutor<T> interface and inject it in an object with the @Autowired annotation. Those examples are working very well, but the configuration is totally different from my application's configuration. I want to do the same, but for a reason I do not understand, I'm getting only errors on the run time saying they can't find the qualified Bean name for my private attribute of type that is implementing CrudRepository<T,Long>, QuerydslPredicateExecutor<T>;
It's because they are Interfaces and not Classes. Most of the examples I've seen does the same thing. You extend your intertface with CrudRepository<T,O> for implementing the basic database commands and then, the QuerydlsPredicateExecutor<T> for genarating the type safe query API.
After that, you can generate Q[your_query_name] object that you can use to create your own query :
Okay I think your problem lies with the @norepositorybean
That annotation makes it so spring doesn't create an instance. Maybe you need it to use the querydsl interface. You might have to create the bean yourself if you are using that annotation.