Assert.isTrue 自定义异常 自定义异常检测 条件为 false 时触发 Assert.isTrue(stuList.size() > 0, "当前集合为空"); 解决方案 调整 关键字为 true