querydsl / querydsl

Unified Queries for Java
https://querydsl.com
Apache License 2.0
4.74k stars 873 forks source link

Are there plans to support SpringBoot3.0(Java17)? #3296

Closed FirePrayer closed 2 years ago

FirePrayer commented 2 years ago

Are there plans to support SpringBoot3.0(Java17)?

jwgmeligmeyling commented 2 years ago

What exactly broke with Spring Boot 3.0?

The cglib seems to only address com.querydsl.alias which is a rather specific feature and should not break Querydsl as a whole.

jwgmeligmeyling commented 2 years ago

As shown by #3333 we do support Java 17 and I've been using it with Spring Boot 3.0 just fine. In fact, Querydsl 5.0 is still included in Spring Data as optional dependency. So I guess this issue is invalid, except from maybe specific modules / features of Querydsl. But then the issue description needs to be more specific (reproducer, stacktrace)

raj-kindly commented 1 year ago

JPA Annotation processor is not working with spring boot 3.0 as it is asking for javax.

jwgmeligmeyling commented 1 year ago

You have to use the jakarta qualifier in that case.

bbtanou commented 1 year ago

JPA Annotation processor is not working with spring boot 3.0 as it is asking for javax.

i have the same issue and can't just work around it till now. I had a working project already under spring boot 2.7.x. After migration and replacing all javax to jakarta, am having this error : Failed to execute goal com.mysema.maven:apt-maven-plugin:1.1.3:process (default) on project core: java.lang.RuntimeException: java.lang.NoClassDefFoundError: javax/persistence/Entity: javax.persistence.Entity

Sorry for reopening... i really need some help. An important part of my project uses querydsl.

jwgmeligmeyling commented 1 year ago

But you shouldn't use the apt-maven-plugin to use Querydsl. Its been deprecated since Querydsl 3. Just use:

<dependency>
    <groupId>com.querydsl</groupId>
    <artifactId>querydsl-apt</artifactId>
    <version>5.0.0</version>
    <scope>provided</scope>
    <classifier>jakarta</classifier>
</dependency>
bbtanou commented 1 year ago

But you shouldn't use the apt-maven-plugin to use Querydsl. Its been deprecated since Querydsl 3. Just use:

<dependency>
    <groupId>com.querydsl</groupId>
    <artifactId>querydsl-apt</artifactId>
    <version>5.0.0</version>
    <scope>provided</scope>
    <classifier>jakarta</classifier>
</dependency>

First of all THANK YOU VERY MUCH FOR THE HELP...

So, this update helped me get rid of the first problem, now i have this issue : cannot access javax.persistence.EntityManager class file for javax.persistence.EntityManager not found .

Althougt it's right because there is no more javax on the project, but on the other hand, JPAQuery require EntityManager from javax to construct itself.

`package com.querydsl.jpa.impl;

import com.querydsl.core.DefaultQueryMetadata; import com.querydsl.core.QueryMetadata; import com.querydsl.core.Tuple; import com.querydsl.core.types.Expression; import com.querydsl.jpa.JPQLTemplates; import javax.persistence.EntityManager;

public class JPAQuery extends AbstractJPAQuery<T, JPAQuery> { public JPAQuery() { super((EntityManager)null, JPQLTemplates.DEFAULT, new DefaultQueryMetadata()); }

public JPAQuery(EntityManager em) {
    super(em, JPAProvider.getTemplates(em), new DefaultQueryMetadata());
}

` I've been searching for another way through this but can't find a solution yet. Is there something you can suggest to me please... ?

jwgmeligmeyling commented 1 year ago

Afaik you should use the jakarta classifier for the querydsl-jpa dependemccy as well

bbtanou commented 1 year ago

Afaik you should use the jakarta classifier for the querydsl-jpa dependemccy as well

Thank you so much it worked.

totof3110 commented 1 year ago

But you shouldn't use the apt-maven-plugin to use Querydsl. Its been deprecated since Querydsl 3. Just use:

<dependency>
    <groupId>com.querydsl</groupId>
    <artifactId>querydsl-apt</artifactId>
    <version>5.0.0</version>
    <scope>provided</scope>
    <classifier>jakarta</classifier>
</dependency>

@jwgmeligmeyling Is that true? QueryDSL's documentation still refers to that plugin (https://github.com/querydsl/querydsl/blob/master/querydsl-jpa/README.md). How would the Q-classes be generated without it? Could you clarify?

FirePrayer commented 1 year ago

implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta' annotationProcessor 'com.querydsl:querydsl-apt:5.0.0:jakarta'

like shis

rohitkrishna094 commented 1 year ago

Does anyone have the full working build.gradle? I only see maven examples online.

FirePrayer commented 1 year ago

plugins { id 'java' id 'org.springframework.boot' version '3.0.5' id 'io.spring.dependency-management' version '1.1.0' }

group = 'com.example' version = '0.0.1-SNAPSHOT' sourceCompatibility = '17'

repositories { mavenCentral() }

dependencies { implementation 'org.springframework.boot:spring-boot-starter' implementation 'org.springframework.boot:spring-boot-starter-web' //接口请求参数效验包 implementation 'org.springframework.boot:spring-boot-starter-validation' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' //redis缓存包 // 1.没有导入redis和spring cache之前,默认实现类:ConcurrentMapCacheManager // 2.导入以后使用的实现类:RedisCacheManager implementation 'org.springframework.boot:spring-boot-starter-data-redis' //implementation 'org.springframework.boot:spring-boot-starter-jdbc' //缓存 //implementation 'org.springframework.boot:spring-boot-starter-cache' //mysql-connector-java 是MySQL提供的JDBC驱动包,用JDBC连接MySQL数据库时必须使用该jar包,主要作用1、与数据库建立连接2、发送SQL语句3、处理结果 implementation 'mysql:mysql-connector-java:8.0.27' implementation 'io.springfox:springfox-swagger2:2.7.0' implementation 'io.springfox:springfox-swagger-ui:2.7.0' implementation 'com.squareup.okhttp3:okhttp:4.9.0' implementation 'com.auth0:java-jwt:3.10.3' //通用工具包 implementation 'org.apache.commons:commons-lang3:3.7'

//querydsl查询 implementation 'com.querydsl:querydsl-core:5.0.0' //manyToMany需要用到 implementation 'com.querydsl:querydsl-sql:5.0.0' implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta' //implementation 'com.querydsl:querydsl-apt:5.0.0' //关键地方(记得开启annotationProcessor才能生成Q文件) //annotationProcessor 'com.querydsl:querydsl-apt:5.0.0:jpa' annotationProcessor 'com.querydsl:querydsl-apt:5.0.0:jakarta' annotationProcessor 'org.springframework.boot:spring-boot-starter-data-jpa' //annotationProcessor 'org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.2.Final'

//使项目下application.properties文件自动生成 annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'

//解析html implementation 'org.jsoup:jsoup:1.13.1' //implementation 'org.jodd:jodd-all:3.9.1' //日志输出 implementation 'org.projectlombok:lombok:1.18.18'

compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok'

testImplementation 'org.springframework.boot:spring-boot-starter-test' }

tasks.named('test') { useJUnitPlatform() }

在 2023-04-18 05:42:59,"rohitkrishna094" @.***> 写道:

Does anyone have the full working build.gradle? I only see maven examples online.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

lucasfrederico commented 10 months ago

Guys, I'm trying to make this work, but it doesn't work for me. If I remove the maven-compiler-plugin, I get the message "Compilation failure Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: com.querydsl.apt.jpa.JPAAnnotationProcessor Unable to get public no-arg constructor".

Can anyone help me? My my pom.xml

FirePrayer commented 10 months ago

不好意思,我一直用的Maven,我不太熟悉Pom.

At 2023-12-18 08:06:18, "Lucas Frederico" @.***> wrote:

`

4.0.0

br.com.sonartrip.intern internsonartripbackend 0.0.1-SNAPSHOT jar Intern SonarTrip Backend 3.2.5 17 v18.18.2 10.2.2 UTF-8 UTF-8 yyyyMMddHHmmss ${java.version} ${java.version} br.com.sonartrip.intern.InternSonarTripBackendApp -Djava.security.egd=file:/dev/./urandom -Xmx1G jdt_apt false 8.0.0 3.1.5 1.1.0 10.12.4 1.11 1.14.2 7.0.0 6.2.13.Final 0.8.11 4.0.4 amd64 eclipse-temurin:17-jre-focal 3.4.0 1.0.0 4.24.0 5.0.0 1.5.5.Final 3.1.0 3.3.1 3.3.2 3.11.0 2.1 3.4.1 3.2.1 2.2.1 3.3.0 3.6.0 3.3.1 3.12.1 3.2.1 3.4.0 2.7.0 0.0.11 1.2.1 3.10.0.2594 2.40.0 3.0.2 0.12.3 1.18.28 tech.jhipster jhipster-dependencies ${jhipster-dependencies.version} pom import io.jsonwebtoken jjwt-api ${jjwt.version} io.jsonwebtoken jjwt-impl ${jjwt.version} runtime io.jsonwebtoken jjwt-jackson ${jjwt.version} runtime tech.jhipster jhipster-framework org.springframework.boot spring-boot-configuration-processor provided org.springframework.boot spring-boot-loader-tools org.springframework.boot spring-boot-starter-actuator org.springframework.boot spring-boot-starter-cache org.springframework.boot spring-boot-starter-data-jpa org.springframework.boot spring-boot-starter-logging org.springframework.boot spring-boot-starter-mail org.springframework.boot spring-boot-starter-oauth2-resource-server org.springframework.boot spring-boot-starter-security org.springframework.boot spring-boot-starter-test test org.springframework.boot spring-boot-starter-thymeleaf org.springframework.boot spring-boot-starter-undertow org.projectlombok lombok ${org.projectlombok.version} org.springframework.boot spring-boot-starter-web org.springframework.boot spring-boot-starter-websocket org.springframework.boot spring-boot-test test org.springframework.security spring-security-data org.springframework.security spring-security-messaging org.springframework.security spring-security-test test org.springdoc springdoc-openapi-starter-webmvc-api com.fasterxml.jackson.datatype jackson-datatype-hibernate6 com.fasterxml.jackson.datatype jackson-datatype-hppc com.fasterxml.jackson.datatype jackson-datatype-jsr310 com.fasterxml.jackson.module jackson-module-jaxb-annotations com.mysql mysql-connector-j com.tngtech.archunit archunit-junit5-api ${archunit-junit5.version} test com.tngtech.archunit archunit-junit5-engine ${archunit-junit5.version} test com.zaxxer HikariCP io.dropwizard.metrics metrics-core io.micrometer micrometer-registry-prometheus jakarta.annotation jakarta.annotation-api org.apache.commons commons-lang3 org.hibernate.orm hibernate-core ${hibernate.version} org.hibernate.orm hibernate-jcache ${hibernate.version} org.hibernate.orm hibernate-jpamodelgen provided org.hibernate.validator hibernate-validator org.liquibase liquibase-core ${liquibase.version} com.querydsl querydsl-jpa ${querydsl.version} jakarta com.querydsl querydsl-apt ${querydsl.version} jakarta io.jsonwebtoken jjwt-api io.jsonwebtoken jjwt-impl runtime io.jsonwebtoken jjwt-jackson runtime org.mapstruct mapstruct ${mapstruct.version} org.mapstruct mapstruct-processor ${mapstruct.version} provided org.redisson redisson org.testcontainers jdbc test org.testcontainers junit-jupiter test org.testcontainers mysql test org.testcontainers testcontainers test jakarta.persistence jakarta.persistence-api spring-boot:run org.springframework.boot spring-boot-maven-plugin com.diffplug.spotless spotless-maven-plugin com.google.cloud.tools jib-maven-plugin org.apache.maven.plugins maven-checkstyle-plugin org.apache.maven.plugins maven-compiler-plugin org.apache.maven.plugins maven-eclipse-plugin org.apache.maven.plugins maven-enforcer-plugin org.apache.maven.plugins maven-failsafe-plugin org.apache.maven.plugins maven-idea-plugin org.apache.maven.plugins maven-javadoc-plugin org.apache.maven.plugins maven-resources-plugin org.apache.maven.plugins maven-surefire-plugin org.codehaus.mojo properties-maven-plugin org.gaul modernizer-maven-plugin org.jacoco jacoco-maven-plugin org.sonarsource.scanner.maven sonar-maven-plugin org.liquibase liquibase-maven-plugin org.liquibase liquibase-maven-plugin ${liquibase.version} src/main/resources/config/liquibase/changelog-master.xml src/main/resources/config/liquibase/changelog-master.xml src/main/resources/config/liquibase/changelog/${maven.build.timestamp}_changelog.xml src/main/resources/config/liquibase/liquibase.properties org.liquibase liquibase-core ${liquibase.version} org.liquibase.ext liquibase-hibernate6 ${liquibase.version} org.springframework.boot spring-boot-starter-data-jpa ${spring-boot.version} jakarta.validation jakarta.validation-api ${validation-api.version} org.springframework.boot spring-boot-maven-plugin ${spring-boot.version} repackage ${start-class} org.apache.maven.plugins maven-surefire-plugin ${maven-surefire-plugin.version} alphabetical **/*IT* **/*IntTest* api-docs ,api-docs dev true dev${profile.tls} testdev jdbc:mysql://localhost:3306/internsonartripbackend root org.springframework.boot spring-boot-devtools true IDE org.mapstruct mapstruct-processor ${mapstruct.version} org.hibernate.orm hibernate-jpamodelgen prod prod${profile.api-docs}${profile.tls}${profile.e2e} testprod jdbc:mysql://localhost:3306/internsonartripbackend root org.apache.maven.plugins maven-clean-plugin target/classes/static/ org.springframework.boot spring-boot-maven-plugin build-info tls ,tls

`

Guys, I'm trying to make this work, but it doesn't work for me. If I remove the maven-compiler-plugin, I get the message "Compilation failure Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: com.querydsl.apt.jpa.JPAAnnotationProcessor Unable to get public no-arg constructor".

Can anyone help me? Above is my pom.xml

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

lucasfrederico commented 10 months ago

不好意思,我一直用的Maven,我不太熟悉Pom. At 2023-12-18 08:06:18, "Lucas Frederico" @.*> wrote: 4.0.0 <groupId>br.com.sonartrip.intern</groupId> <artifactId>internsonartripbackend</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>Intern SonarTrip Backend</name> <properties> <!-- Build properties The spring-boot version should match the one managed by https://mvnrepository.com/artifact/tech.jhipster/jhipster-dependencies/${jhipster-dependencies.version} --> <maven.version>3.2.5</maven.version> <java.version>17</java.version> <node.version>v18.18.2</node.version> <npm.version>10.2.2</npm.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format> <maven.compiler.source>${java.version}</maven.compiler.source> <maven.compiler.target>${java.version}</maven.compiler.target> <start-class>br.com.sonartrip.intern.InternSonarTripBackendApp</start-class> <argLine>-Djava.security.egd=file:/dev/./urandom -Xmx1G</argLine> <m2e.apt.activation>jdt_apt</m2e.apt.activation> <run.addResources>false</run.addResources> <jhipster-dependencies.version>8.0.0</jhipster-dependencies.version> <spring-boot.version>3.1.5</spring-boot.version> <archunit-junit5.version>1.1.0</archunit-junit5.version> <checkstyle.version>10.12.4</checkstyle.version> <checksum-maven-plugin.version>1.11</checksum-maven-plugin.version> <frontend-maven-plugin.version>1.14.2</frontend-maven-plugin.version> <git-commit-id-maven-plugin.version>7.0.0</git-commit-id-maven-plugin.version> <hibernate.version>6.2.13.Final</hibernate.version> <jacoco-maven-plugin.version>0.8.11</jacoco-maven-plugin.version> <jaxb-runtime.version>4.0.4</jaxb-runtime.version> <jib-maven-plugin.architecture>amd64</jib-maven-plugin.architecture> <jib-maven-plugin.image>eclipse-temurin:17-jre-focal</jib-maven-plugin.image> <jib-maven-plugin.version>3.4.0</jib-maven-plugin.version> <lifecycle-mapping.version>1.0.0</lifecycle-mapping.version> <liquibase-plugin.password/> <liquibase-plugin.url/> <liquibase-plugin.username/> <liquibase.version>4.24.0</liquibase.version> <querydsl.version>5.0.0</querydsl.version> <mapstruct.version>1.5.5.Final</mapstruct.version> <maven-antrun-plugin.version>3.1.0</maven-antrun-plugin.version> <maven-checkstyle-plugin.version>3.3.1</maven-checkstyle-plugin.version> <maven-clean-plugin.version>3.3.2</maven-clean-plugin.version> <maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version> <maven-eclipse-plugin.version>2.1</maven-eclipse-plugin.version> <maven-enforcer-plugin.version>3.4.1</maven-enforcer-plugin.version> <maven-failsafe-plugin.version>3.2.1</maven-failsafe-plugin.version> <maven-idea-plugin.version>2.2.1</maven-idea-plugin.version> <maven-jar-plugin.version>3.3.0</maven-jar-plugin.version> <maven-javadoc-plugin.version>3.6.0</maven-javadoc-plugin.version> <maven-resources-plugin.version>3.3.1</maven-resources-plugin.version> <maven-site-plugin.version>3.12.1</maven-site-plugin.version> <maven-surefire-plugin.version>3.2.1</maven-surefire-plugin.version> <maven-war-plugin.version>3.4.0</maven-war-plugin.version> <modernizer-maven-plugin.version>2.7.0</modernizer-maven-plugin.version> <nohttp-checkstyle.version>0.0.11</nohttp-checkstyle.version> <profile.api-docs/> <profile.e2e/> <profile.no-liquibase/> <profile.test/> <profile.tls/> <properties-maven-plugin.version>1.2.1</properties-maven-plugin.version> <sonar-maven-plugin.version>3.10.0.2594</sonar-maven-plugin.version> <spotless-maven-plugin.version>2.40.0</spotless-maven-plugin.version> <validation-api.version>3.0.2</validation-api.version> <jjwt.version>0.12.3</jjwt.version> <org.projectlombok.version>1.18.28</org.projectlombok.version> </properties> <dependencyManagement> <dependencies> <dependency> <groupId>tech.jhipster</groupId> <artifactId>jhipster-dependencies</artifactId> <version>${jhipster-dependencies.version}</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt-api</artifactId> <version>${jjwt.version}</version> </dependency> <dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt-impl</artifactId> <version>${jjwt.version}</version> <scope>runtime</scope> </dependency> <dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt-jackson</artifactId> <version>${jjwt.version}</version> <scope>runtime</scope> </dependency> </dependencies> </dependencyManagement> <dependencies> <dependency> <groupId>tech.jhipster</groupId> <artifactId>jhipster-framework</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-loader-tools</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-cache</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-logging</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-mail</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-oauth2-resource-server</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-undertow</artifactId> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>${org.projectlombok.version}</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-websocket</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-data</artifactId> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-messaging</artifactId> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.springdoc</groupId> <artifactId>springdoc-openapi-starter-webmvc-api</artifactId> </dependency> <dependency> <groupId>com.fasterxml.jackson.datatype</groupId> <artifactId>jackson-datatype-hibernate6</artifactId> </dependency> <dependency> <groupId>com.fasterxml.jackson.datatype</groupId> <artifactId>jackson-datatype-hppc</artifactId> </dependency> <dependency> <groupId>com.fasterxml.jackson.datatype</groupId> <artifactId>jackson-datatype-jsr310</artifactId> </dependency> <dependency> <groupId>com.fasterxml.jackson.module</groupId> <artifactId>jackson-module-jaxb-annotations</artifactId> </dependency> <dependency> <groupId>com.mysql</groupId> <artifactId>mysql-connector-j</artifactId> </dependency> <dependency> <groupId>com.tngtech.archunit</groupId> <artifactId>archunit-junit5-api</artifactId> <version>${archunit-junit5.version}</version> <scope>test</scope> </dependency> <dependency> <!-- Adding the engine dependency to the surefire-plugin unfortunately does not work in the current version. --> <!-- https://www.archunit.org/userguide/html/000_Index.html#_junit_5 --> <groupId>com.tngtech.archunit</groupId> <artifactId>archunit-junit5-engine</artifactId> <version>${archunit-junit5.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>com.zaxxer</groupId> <artifactId>HikariCP</artifactId> </dependency> <dependency> <groupId>io.dropwizard.metrics</groupId> <artifactId>metrics-core</artifactId> </dependency> <dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-registry-prometheus</artifactId> </dependency> <dependency> <groupId>jakarta.annotation</groupId> <artifactId>jakarta.annotation-api</artifactId> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> </dependency> <dependency> <groupId>org.hibernate.orm</groupId> <artifactId>hibernate-core</artifactId> <version>${hibernate.version}</version> </dependency> <dependency> <groupId>org.hibernate.orm</groupId> <artifactId>hibernate-jcache</artifactId> <version>${hibernate.version}</version> </dependency> <dependency> <groupId>org.hibernate.orm</groupId> <artifactId>hibernate-jpamodelgen</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>org.hibernate.validator</groupId> <artifactId>hibernate-validator</artifactId> </dependency> <dependency> <groupId>org.liquibase</groupId> <artifactId>liquibase-core</artifactId> <version>${liquibase.version}</version> </dependency> <dependency> <groupId>com.querydsl</groupId> <artifactId>querydsl-jpa</artifactId> <version>${querydsl.version}</version> <classifier>jakarta</classifier> </dependency> <dependency> <groupId>com.querydsl</groupId> <artifactId>querydsl-apt</artifactId> <version>${querydsl.version}</version> <classifier>jakarta</classifier> </dependency> <dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt-api</artifactId> </dependency> <dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt-impl</artifactId> <scope>runtime</scope> </dependency> <dependency> <groupId>io.jsonwebtoken</groupId> <artifactId>jjwt-jackson</artifactId> <scope>runtime</scope> </dependency> <dependency> <groupId>org.mapstruct</groupId> <artifactId>mapstruct</artifactId> <version>${mapstruct.version}</version> </dependency> <dependency> <groupId>org.mapstruct</groupId> <artifactId>mapstruct-processor</artifactId> <version>${mapstruct.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.redisson</groupId> <artifactId>redisson</artifactId> </dependency> <dependency> <groupId>org.testcontainers</groupId> <artifactId>jdbc</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.testcontainers</groupId> <artifactId>junit-jupiter</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.testcontainers</groupId> <artifactId>mysql</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.testcontainers</groupId> <artifactId>testcontainers</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>jakarta.persistence</groupId> <artifactId>jakarta.persistence-api</artifactId> </dependency> </dependencies> <build> <defaultGoal>spring-boot:run</defaultGoal> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> </plugin> <plugin> <groupId>com.google.cloud.tools</groupId> <artifactId>jib-maven-plugin</artifactId> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-idea-plugin</artifactId> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>properties-maven-plugin</artifactId> </plugin> <plugin> <groupId>org.gaul</groupId> <artifactId>modernizer-maven-plugin</artifactId> </plugin> <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> </plugin> <plugin> <groupId>org.sonarsource.scanner.maven</groupId> <artifactId>sonar-maven-plugin</artifactId> </plugin> <plugin> <groupId>org.liquibase</groupId> <artifactId>liquibase-maven-plugin</artifactId> </plugin> </plugins> <pluginManagement> <plugins> <plugin> <groupId>org.liquibase</groupId> <artifactId>liquibase-maven-plugin</artifactId> <version>${liquibase.version}</version> <configuration> <outputChangeLogFile>src/main/resources/config/liquibase/changelog-master.xml </outputChangeLogFile> <changeLogFile>src/main/resources/config/liquibase/changelog-master.xml</changeLogFile> <diffChangeLogFile> src/main/resources/config/liquibase/changelog/${maven.build.timestamp}_changelog.xml </diffChangeLogFile> <propertyFile>src/main/resources/config/liquibase/liquibase.properties</propertyFile> </configuration> <dependencies> <dependency> <groupId>org.liquibase</groupId> <artifactId>liquibase-core</artifactId> <version>${liquibase.version}</version> </dependency> <dependency> <groupId>org.liquibase.ext</groupId> <artifactId>liquibase-hibernate6</artifactId> <version>${liquibase.version}</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> <version>${spring-boot.version}</version> </dependency> <dependency> <groupId>jakarta.validation</groupId> <artifactId>jakarta.validation-api</artifactId> <version>${validation-api.version}</version> </dependency> </dependencies> </plugin> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>${spring-boot.version}</version> <executions> <execution> <goals> <goal>repackage</goal> </goals> </execution> </executions> <configuration> <mainClass>${start-class}</mainClass> <!-- Enable the line below to have remote debugging of your application on port 5005 <jvmArguments>-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005</jvmArguments> --> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>${maven-surefire-plugin.version}</version> <configuration> <!-- Force alphabetical order to have a reproducible build --> <runOrder>alphabetical</runOrder> <excludes> <exclude>**/*IT*</exclude> <exclude>**/*IntTest*</exclude> </excludes> </configuration> </plugin> </plugins> </pluginManagement> </build> <profiles> <profile> <id>api-docs</id> <properties> <profile.api-docs>,api-docs</profile.api-docs> </properties> </profile> <profile> <id>dev</id> <activation> <activeByDefault>true</activeByDefault> </activation> <properties> <!-- default Spring profiles --> <spring.profiles.active>dev${profile.tls}</spring.profiles.active> <profile.test>testdev</profile.test> <liquibase-plugin.url>jdbc:mysql://localhost:3306/internsonartripbackend</liquibase-plugin.url> <liquibase-plugin.username>root</liquibase-plugin.username> <liquibase-plugin.password/> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency> </dependencies> </profile> <profile> <!-- Profile for applying IDE-specific configuration. At the moment it configures MapStruct and Hibernate JPA Metamodel Generator, which you need when working with DTOs and entity filtering. --> <id>IDE</id> <dependencies> <dependency> <groupId>org.mapstruct</groupId> <artifactId>mapstruct-processor</artifactId> <version>${mapstruct.version}</version> </dependency> <dependency> <groupId>org.hibernate.orm</groupId> <artifactId>hibernate-jpamodelgen</artifactId> </dependency> </dependencies> </profile> <profile> <id>prod</id> <properties> <!-- default Spring profiles --> <spring.profiles.active>prod${profile.api-docs}${profile.tls}${profile.e2e}</spring.profiles.active> <profile.test>testprod</profile.test> <liquibase-plugin.url>jdbc:mysql://localhost:3306/internsonartripbackend</liquibase-plugin.url> <liquibase-plugin.username>root</liquibase-plugin.username> <liquibase-plugin.password/> </properties> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-clean-plugin</artifactId> <configuration> <filesets> <fileset> <directory>target/classes/static/</directory> </fileset> </filesets> </configuration> </plugin> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <executions> <execution> <goals> <goal>build-info</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </profile> <profile> <id>tls</id> <properties> <profile.tls>,tls</profile.tls> </properties> </profile> </profiles> Guys, I'm trying to make this work, but it doesn't work for me. If I remove the maven-compiler-plugin, I get the message "Compilation failure Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: com.querydsl.apt.jpa.JPAAnnotationProcessor Unable to get public no-arg constructor". Can anyone help me? Above is my pom.xml — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: *@.>

?

liuchengts commented 10 months ago

Under gradle (kotlin) I solved it https://github.com/querydsl/querydsl/issues/3651