Skip to content

Allow SpEL MapAccessor to return null for nonexistent keys #35534

@jobmission

Description

@jobmission

Allow SpEL MapAccessor to return null for nonexistent keys in its canRead() and read() methods.

My usage scenario:

A long text, such as an HTML template or email template, contains variables and expressions. Use a map to provide variable values, replace and evaluate expressions with SpEL, but some variables may not be in the map.

Image

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: duplicateA duplicate of another issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions