3.5Spring字段格式化
3.5.1 Formatter SPI
package org.springframework.format;
public interface Formatter<T> extends Printer<T>, Parser<T> {
}public interface Printer<T> {
String print(T fieldValue, Locale locale);
}
import java.text.ParseException;
public interface Parser<T> {
T parse(String clientValue, Locale locale) throws ParseException;
}3.5.2 注解驱动的Formatting
3.5.3 FormatterRegistry SPI
3.5.4 FormatterRegistrar SPI
3.5.5.在 Spring MVC 中配置Formatting
最后更新于
这有帮助吗?