小编lim*_*ain的帖子

在 Query DSL 中没有找到查询类。但是Q Class已经存在并且Intellij已经设置

我正在尝试在我的项目中使用 QDataTableRepository 。这让我必须导入querydsl。

构建.gradle

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'idea'

repositories {
    mavenCentral()
}


dependencies {
    compile("org.springframework.boot:spring-boot-devtools")
    compile('org.springframework.boot:spring-boot-starter')
    compile('org.springframework.boot:spring-boot-starter-web')
    compile('org.springframework.boot:spring-boot-starter-data-jpa')
    compile('org.postgresql:postgresql:9.4.1212')
    compile('org.projectlombok:lombok:1.16.10')
    compile group: 'com.github.darrachequesne', name: 'spring-data-jpa-datatables', version: '3.1'
    compile group: 'com.querydsl', name: 'querydsl-jpa', version: '4.1.4'
    compile group: 'com.querydsl', name: 'querydsl-apt', version: '4.1.4'

    testCompile('org.springframework.boot:spring-boot-starter-test')

}

configurations {
    querydslapt
}

sourceSets {
    generated
}
sourceSets.generated.java.srcDirs = ['generated/']

task generateQueryDSL(type: JavaCompile, group: 'build', description: 'Generates the QueryDSL query types') {
    source = sourceSets.main.java
    classpath = configurations.compile …
Run Code Online (Sandbox Code Playgroud)

intellij-idea gradle querydsl spring-boot

5
推荐指数
1
解决办法
4670
查看次数

标签 统计

gradle ×1

intellij-idea ×1

querydsl ×1

spring-boot ×1