解决方法在测试类上增加注解@SuppressStaticInitializationFor("org.mycompany.ClassWithEvilStaticInitializer")里面填上你要mock类的包名+类名参考 ...
確定! 回上一頁