-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement
Milestone
Description
spring-beans
ships a YamlProcessor
that's used as a base class by YamlMapFactoryBean
and YamlPropertiesFactoryBean
. These implementations have a clear use case: mapping application-internal Yaml documents for configuration or infrastructure purposes.
Since this use case rarely requires extended types support from the underlying library, and since we're offering ways to list custom types (since #25152), we'll restrict to java standard types only by default. This simplifies the setup and focuses the abstract class on the core use cases.
Developers can leverage #25152 to allow custom types like this:
YamlMapFactoryBean factory = new YamlMapFactoryBean();
factory.setResources(resource);
// Allow constructors for custom types User and Book
factory.setSupportedTypes(User.class, Book.class);
Map<String, Object> map = factory.getObject();
sbrannen
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement