该文章主要为完成实训任务,详细实现过程及结果见【http://t.csdn.cn/pG623】
文章目录
一、Spring Boot单元测试概述
1.1 对项目HelloWorld01进行单元测试
1. 添加测试依赖启动器和单元测试
- 修改pom.xml文件,添加依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test