标签: jvm-test-suite

Gradle jvm-test-suite 与 spring boot 3

我正在尝试使用 spring boot poject 配置 gradle id 'jvm-test-suite' 插件

plugins {
    id 'java'
    id 'jvm-test-suite'
    id 'org.springframework.boot' version '3.0.0'
    id 'io.spring.dependency-management' version '1.1.0'
}

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

repositories {
    mavenCentral()
}

ext {
    set('testcontainersVersion', "1.17.6")
}

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
    implementation 'org.springframework.boot:spring-boot-starter-web'
}

dependencyManagement {
    imports {
        mavenBom "org.testcontainers:testcontainers-bom:${testcontainersVersion}"
    }
}

testing {
    suites {
        configureEach {
            useJUnitJupiter()
            dependencies {
                implementation project()
                implementation 'org.springframework.boot:spring-boot-starter-test'
                implementation 'org.testcontainers:junit-jupiter'
                implementation 'org.testcontainers:mongodb'
            }
        }
        test {


        }

        integrationTest(JvmTestSuite) …
Run Code Online (Sandbox Code Playgroud)

gradle spring-boot jvm-test-suite

2
推荐指数
1
解决办法
1676
查看次数

标签 统计

gradle ×1

jvm-test-suite ×1

spring-boot ×1