@before
在每个测试方法之前都执行一次, 方法需要声明为public
@beforeclass
只在类中执行一次, 必须声明为public static
junit中@Before和@BeforeClass区别
原文:https://www.cnblogs.com/yaoyuan2/p/11561474.html