0
点赞
收藏
分享

微信扫一扫

如何在springboot项目中添加测试

楠蛮鬼影 2022-05-03 阅读 47

目录标题

问题描述

在一个springboot、spring、maven项目中,由于项目创建之初没有添加测试依赖,现在打算给项目添加测试。

解决步骤

1、pom中添加依赖

       <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

2、构建测试类
在这里插入图片描述

举报

相关推荐

0 条评论