同步操作将从 backflow/framework-server 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
import cn.backflow.lib.util.StringUtil;import java.lang.reflect.Array;import java.text.SimpleDateFormat;import java.util.Collection;import java.util.Date;import java.util.Map;/*** Ognl工具类,主要是为了在ognl表达式访问静态方法时可以减少长长的类名称编写* Ognl访问静态方法的表达式为: @class@method(args) 如:* <p>* <pre>* <if test="@Ognl@isNotEmpty(userId)">* and user_id = #{userId}* </if>* </pre>*/public class Ognl {public static void main(String[] args) throws Exception {System.out.println(StringUtil.md5("taeyeon", "taeyeon"));SimpleDateFormat format = new SimpleDateFormat("yyyy-M-d");Date date = format.parse("2009-1-2");System.out.println(date);}/*** 可以用于判断String,Map,Collection,Array是否为空** @param o 目标对象*/public static boolean isEmpty(Object o) throws IllegalArgumentException {if (o == null) return true;if (o instanceof String) {if (((String) o).length() == 0) {return true;}} else if (o instanceof Collection) {if (((Collection<?>) o).isEmpty()) {return true;}} else if (o.getClass().isArray()) {if (Array.getLength(o) == 0) {return true;}} else if (o instanceof Map) {if (((Map<?, ?>) o).isEmpty()) {return true;}} elsereturn false;return false;}/*** 可以用于判断 Map,Collection,String,Array是否不为空*/public static boolean isNotEmpty(Object o) {return !isEmpty(o);}public static boolean isNotBlank(Object o) {return !isBlank(o);}public static boolean isNumber(Object o) {if (o == null) return false;if (o instanceof Number) return true;if (o instanceof String) {String str = (String) o;if (str.length() == 0) return false;if (str.trim().length() == 0) return false;try {Double.parseDouble(str);return true;} catch (NumberFormatException e) {return false;}}return false;}public static boolean isBlank(Object o) {return o == null || o instanceof String && isBlank((String) o);}public static boolean isBlank(String str) {if (str == null || str.length() == 0) return true;for (int i = 0; i < str.length(); i++) {if (!Character.isWhitespace(str.charAt(i))) {return false;}}return true;}}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。