Closed manosbatsis closed 1 year ago
V6.0.2
I'm getting:
Caused by: java.lang.IllegalStateException: No entity manager bean found in application context
at io.github.perplexhub.rsql.RSQLVisitorBase.getManagedType(RSQLVisitorBase.java:186) ~[rsql-common-6.0.2.jar:?]
at io.github.perplexhub.rsql.RSQLJPAPredicateConverter.findPropertyPath(RSQLJPAPredicateConverter.java:61) ~[rsql-jpa-6.0.2.jar:?]
at io.github.perplexhub.rsql.RSQLJPAPredicateConverter.visit(RSQLJPAPredicateConverter.java:188) ~[rsql-jpa-6.0.2.jar:?]
at io.github.perplexhub.rsql.RSQLJPAPredicateConverter.visit(RSQLJPAPredicateConverter.java:25) ~[rsql-jpa-6.0.2.jar:?]
Do I need to do some extra configuration?
Are you using the starter dependency?
wow...that's was fast
I think is the auto configuration that is not kicking in.
on spring boot 3 you need to define it like:
so a filie like this: META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
and the file content is just: io.github.perplexhub.rsql.RSQLJPAAutoConfiguration
Thanks for pointing out. Would you mind to create a PR to fix it? Thanks.
Thanks. You're proposal will work I guess...as I said is only the auto configuration that isn't working. Did the PR, just waiting for approval.
I ran into the same issue which caused No entity manager bean found in application context
and the solution was adding @EnableJpaRepositories(basePackages = { "io.github.perplexhub.rsql" }})
annotation as shown in Application.java
. Thanks for this great work! @perplexhub
By the way, this configuration was not mentioned in README file. Could you add this requirement for others to be aware of that config? @perplexhub
Updated. Thanks.
See this section in Preparing for Spring Boot 3.0.
Main issue should be the use of Jakarta EE 9 APIs (jakarta.) instead of EE 8 (javax.), e.g.
javax.persistence.EntityManager
should bejakarta.persistence.EntityManager
.Tried Spring Boot 3.0.0-M3 with the current release and it fails to launch with