3.5.4 FormatterRegistrar SPI

FormatterRegistrar는 FormatterRegistry를 통해 Formatter와 Converter를 등록하는 SPI입니다. 다음 목록은 인터페이스 정의를 보여줍니다.

package org.springframework.format;

public interface FormatterRegistrar {

    void registerFormatters(FormatterRegistry registry);
}

FormatterRegistrar는 날짜 포맷팅처럼 지정된 포맷팅 범주에 대해 여러 개의 관련된 Converter와 Formatter를 등록할 때 유용합니다. 선언적인 등록이 불충분한 경우(예: own<T> 와 다른 특정 필드 타입으로 Formatter를 색인 화 해야하거나 Printer/Parser쌍을 등록할 때)에 유용할 수 있습니다. 다음 섹션에서는 Converter 및 Formatter 등록에 대한 자세한 정보를 제공합니다.

Last updated