1. 程式人生 > >spring application 之 型別轉換器TypeConvertor

spring application 之 型別轉換器TypeConvertor

java.beans.PropertyEditor

屬性編輯器,解決spring把字串轉成自定義物件的問題

PropertyEditorRegistry

介面,註冊與查詢PropertyEditor

PropertyEditorRegistrySupport

實現 PropertyEditorRegistry 介面,儲存PropertyEditor的容器。 該類會註冊一些預設的屬性編輯器。

org.springframework.beans.TypeConverter

型別轉換器,注意與ConversionService區分

org.springframework.beans.TypeConverterDelegate

型別轉換器的一個代理類,其實是一個幫助類

TypeConverterSupport

型別轉換器支援類,主要通過呼叫 TypeConverterDelegate 實現方法。

org.springframework.bean.SimpleTypeConverter

簡單的型別換器

PropertyAccessor

Bean的 PropertyValues

ConfigurablePropertyAccessor

多一個ConversionService

AbstractPropertyAccessor

主要是將PropertyeValues 轉成PropertyValue

AbstractNestablePropertyAccessor

設定Bean的屬性值,支援巢狀。

org.springframework.beans.BeanWrapperImpl

AbstractNestablePropertyAccessor 的實現類

org.springframework.core.convert.ConversionService

型別轉換器

GenericConversionService

相關聯的兩個介面 Converter, Formatter

DefaultConversionService

提供一些預設的型別轉換器,都在org.springframework.core.convert.support包下

FormattingConversionService

提供預設的格式化器,與