构建.gradle
apply plugin: "com.ewerk.gradle.plugins.querydsl"
dependencies {
compile "org.springframework.boot:spring-boot"
compile "org.springframework:spring-webflux"
compile "org.springframework.boot:spring-boot-autoconfigure"
compile "org.springframework.data:spring-data-mongodb"
compile "com.querydsl:querydsl-core"
compile group: 'org.mapstruct', name: 'mapstruct-jdk8', version: '1.4.1.Final'
apt "org.mapstruct:mapstruct-processor:1.4.1.Final"
annotationProcessor(
"com.querydsl:querydsl-apt:4.4.0",
"org.projectlombok:lombok:1.18.16"
)
.............
}
querydsl {
springDataMongo = true
querydslSourcesDir = file("${project.buildDir}/generated-sources/querydsl")
}
出了什么问题: 任务 ':event-sourcing:compileQuerydsl' 执行失败。
找不到注释处理器“org.springframework.data.mongodb.repository.support.MongoAnnotationProcessor”
如何解决?
我们如何为 MongoAnnotationProcessor 编写自定义插件?