Skip to content

Document default property converters [SPR-15269] #19834

Open
@spring-projects-issues

Description

@spring-projects-issues

Arend v. Reinersdorff opened SPR-15269 and commented

Spring includes by default a number of useful property converters. Ie values for the targetType parameter in PropertyResolver.getProperty(String key, Class targetType).

Unfortunately these default converters are not documented. The best answer on Stackoverflow suggests executing ConversionService.toString() to get a list of converters.

I was looking for documentation because I was surprised that java.io.File works as targetType while java.nio.file.Path does not. (Turns out File probably works because of the ObjectToObjectConverter that finds the File(String) constructor via reflection)


Affects: 4.3.6

Reference URL: http://docs.spring.io/spring/docs/4.3.6.RELEASE/spring-framework-reference/html/validation.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreIssues in core modules (aop, beans, core, context, expression)type: documentationA documentation task

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions