spring boot 单元测试 --- 在测试类使用 javabean注解操作接口
1.依赖包
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
2.在测试了添加注解
@RunWith(SpringRunner.class) @SpringBootTest

3.使用

本文来自博客园,作者:岑惜,转载请注明原文链接:https://www.cnblogs.com/c2g5201314/p/13090405.html
响应开源精神相互学习,内容良币驱除劣币

浙公网安备 33010602011771号