【发布时间】:2019-05-30 02:01:12
【问题描述】:
我的 Spring Boot 项目显示构建失败并出现以下错误
-------------------------------------------------- ----------------------------------------- 测试集:com.examples.springbootdemo.SpringbootDemoApplicationTests -------------------------------------------------- ----------------------------------------- 测试运行:1,失败:0,错误:1,跳过:0,经过的时间:0.055 sPOM.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example2</groupId>
<artifactId>spring-hello</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>spring-hello</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-rest</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
【问题讨论】:
-
Kunwar 你的问题不够解释!
-
发布您的测试课程并解释整个问题。
-
看起来缺少测试范围的运行时依赖项。请将 pom.xml/build.gradle/etc 添加到您的问题中。
标签: spring-boot