对象

  • #objects: 用于通用对象的实用方法。
  1. /*
  2. * ======================================================================
  3. * See javadoc API for class org.thymeleaf.expression.Objects
  4. * ======================================================================
  5. */
  6. /*
  7. * Return obj if it is not null, and default otherwise
  8. * Also works with arrays, lists or sets
  9. */
  10. ${#objects.nullSafe(obj,default)}
  11. ${#objects.arrayNullSafe(objArray,default)}
  12. ${#objects.listNullSafe(objList,default)}
  13. ${#objects.setNullSafe(objSet,default)}