gpt4 book ai didi

java - 找不到注释处理器 'org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor'

转载 作者:行者123 更新时间:2023-12-03 03:25:39 24 4
gpt4 key购买 nike

我正在尝试在我的Spring Boot应用程序中实现休眠元模型。我正进入(状态

Annotation processor 'org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor' not found

在构建应用程序时出现上述错误。

我的Gradle配置和下面给出的详细错误
buildscript {
ext {
springBootVersion = '2.2.6.RELEASE'
}
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath('se.transmode.gradle:gradle-docker:1.2')
classpath("gradle.plugin.at.comm_unity.gradle.plugins:jpamodelgen-plugin:1.1.4")
}
}

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

apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: "jacoco"
apply from: 'docker.gradle'
apply plugin: "at.comm_unity.gradle.plugins.jpamodelgen"


sourceCompatibility = 1.8

bootJar {
launchScript()
}

repositories {
mavenCentral()
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-mail'
implementation 'org.springframework.boot:spring-boot-starter-quartz'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'io.jsonwebtoken:jjwt-api:0.10.5'
implementation 'org.flywaydb:flyway-core'
compileOnly 'org.projectlombok:lombok'
implementation 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'com.h2database:h2'
runtimeOnly 'mysql:mysql-connector-java'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.10.5'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.10.5'
annotationProcessor 'org.projectlombok:lombok'
annotationProcessor('org.hibernate:hibernate-jpamodelgen:5.4.14.Final')
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
testImplementation 'org.springframework.security:spring-security-test'
}

test.reports.junitXml.setDestination(file("${buildDir}/test-results"))

jacocoTestReport {
reports {
html.destination file("${buildDir}/jacocoHtml")
}
}

jpaModelgen {
library = "org.hibernate:hibernate-jpamodelgen"
jpaModelgenSourcesDir="src/jpaModelgen/java"
}


sourceSets {
main {
java {
srcDirs += "src/jpaModelgen/java"
}
}
}

使用 ./gradlew build --info运行应用程序时,出现以下错误

enter image description here

我正在使用spring-boot 2.2.6,hibernate-jpamodelgen是否有任何版本兼容性。

最佳答案

关于java - 找不到注释处理器 'org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61139976/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com