Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing projection classes in Spring Boot 3 with Querydsl #3721

Open
rcbandit111 opened this issue Apr 11, 2024 · 3 comments
Open

Missing projection classes in Spring Boot 3 with Querydsl #3721

rcbandit111 opened this issue Apr 11, 2024 · 3 comments
Labels

Comments

@rcbandit111
Copy link

I'm trying to migrate querydsl based project with Spring Boot 3.

Test project: https://github.com/rcbandit111/querydsl_migration_poc

With Spring Boot 2 the following configuration is working fine:

implementation 'com.querydsl:querydsl-jpa:5.0.0'
annotationProcessor 'org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.2.Final'
annotationProcessor 'com.querydsl:querydsl-apt:5.0.0:jpa'

But with Spring Boot 3 Qxxx classes are not generated under build\generated\sources\annotationProcessor\java

Any idea how to fix this?

@velo
Copy link
Contributor

velo commented Apr 13, 2024

My fork fully supports springboot 3
https://github.com/OpenFeign/querydsl

Give it a shot.

@bender316
Copy link

Spring Boot3 uses jakarta.* packages whereas your dependencies are the old javax.* ones. If you use the classifier "jakarta" for the querydsl dependencies it should generate Q classes again (at least that was my problem).

@tmslv-ptrcvc
Copy link

tmslv-ptrcvc commented Apr 16, 2024

not an issue, try this instead

/* QueryDSL */
implementation "com.querydsl:querydsl-jpa:5.1.0:jakarta"
annotationProcessor(
        "com.querydsl:querydsl-apt:5.1.0:jakarta",
        "jakarta.persistence:jakarta.persistence-api",
        "jakarta.annotation:jakarta.annotation-api"
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants