com.gccloud.starter.common.utils.AssertUtils Maven / Gradle / Ivy
package com.gccloud.starter.common.utils;
import com.gccloud.starter.common.exception.GlobalException;
import io.jsonwebtoken.lang.Assert;
/**
* 断言工具
*/
public class AssertUtils {
/**
* 断言表格式为真,否则抛出异常信息
*
* @param expression
* @param message
*/
public static void isTrue(boolean expression, String message) {
if (!expression) {
throw new GlobalException(message);
}
}
}