SpringBoot构建失败

时间:2020-05-25 09:47:47

标签: spring-boot

我不知道为什么。 请帮帮我。

我愿意 cmd-> gradlew测试

但是我得到了这段代码

测试失败。参见报告:file:/// C:/Project/build/reports/tests/test/index.html

和StackTrace gradlew测试 我收到此代码

org.gradle.api.tasks.TaskExcutionException:任务':test'的执行失败

这是gradle.build文件代码

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' 
    implementation 'org.springframework.boot:spring-boot-starter-web'
    compileOnly 'org.projectlombok:lombok'
    developmentOnly 'org.springframework.boot:spring-boot-devtools'
    implementation 'org.springframework.boot:spring-boot-starter-data-jpa
    implementation 'org.springframework.boot:spring-boot-starter-jdbc'
    implementation group: 'org.mariadb.jdbc', name: 'mariadb-java-client'
    implementation 'org.springframework.boot:spring-boot-starter-security'
    annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
    annotationProcessor 'org.projectlombok:lombok'
    testImplementation('org.springframework.boot:spring-boot-starter-test') {
        exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
    }
    testImplementation 'org.springframework.security:spring-security-test'
    testCompile group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.6.2'
    compile group: 'org.modelmapper', name: 'modelmapper', version: '2.3.7'
    compile group: 'org.thymeleaf.extras', name: 'thymeleaf-extras-springsecurity5', version: '3.0.4.RELEASE'

    compile group: 'org.mariadb.jdbc', name: 'mariadb-java-client', version: '2.4.0'
    compile group: 'com.zaxxer', name: 'HikariCP', version: '3.3.0'
}

test {
    useJUnitPlatform()
}

这段代码是SpringbootApplicationTests.java

import org.junit.Test;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
class SpringbootApplicationTests {

    @Test
    void contextLoads() {
    }

}

0 个答案:

没有答案