Spring Printer

  • 类全路径: org.springframework.format.Printer
  • 类作用: 对象转换成字符串
  1. @FunctionalInterface
  2. public interface Printer<T> {
  3. /**
  4. * Print the object of type T for display.
  5. * 打印对象
  6. * @param object the instance to print
  7. * @param locale the current user locale
  8. * @return the printed text string
  9. */
  10. String print(T object, Locale locale);
  11. }