学无先后,达者为师

网站首页 编程语言 正文

Springboot测试类中 @Before与@BeforeEach的区别

作者:Jothan Zhong 更新时间: 2024-01-12 编程语言

org.junit.jupiter.api.Test;包中的@Test注解为5.0+ 要用@BeforeEach注解。
org.junit.Test;包中的@Test注解为4.0+,用@Before注解
在这里插入图片描述

原文链接:https://blog.csdn.net/qq_43985303/article/details/135235814

  • 上一篇:没有了
  • 下一篇:没有了
栏目分类
最近更新