SpringフレームワークメソッドPropertyResolver.getProperty(String key, Class targetType)のtargetType
パラメータでサポートされている値は何ですか?私はデフォルトでサポートされているタイプのリストを探しています。Springにはどのようなプロパティタイプコンバータが組み込まれていますか?
次の種類が明らかに動作します:
- Locale.class
- File.class
- int.classを
- URI.class
例:
// works
Locale myLocale = propertyResolver.getProperty("my.locale", Locale.class);
を
このリストが見つかりました: http://www.logicbig.com/how-to/spring-framework/spring-converters-list/ しかし、それはFile
またはURI
をリストしていないので、完全ではないようです。また、私は公式の文書を好むでしょう。
reference documentation chapter on type conversionのいずれも見つかりませんでした。
[DefaultConversionService(https://github.com/spring-projects/spring-framework/blob/b22a59a0c4ea118147dc45c563d68234b8692d97/spring-core/src/main/java/org/springframework/core/convert/support/DefaultConversionService。 java)は、組み込みのコンバータの束を定義します。それはおそらく始めるのに良い場所です。 –