Skip to content

Use DefaultParameterNameDiscoverer.getSharedInstance() #18330

@rwinch

Description

@rwinch

As of Spring Framework 7.0.3 it is recommended to use DefaultParameterNameDiscoverer.getSharedInstance() rather than re-instantiating a custom DefaultParameterNameDiscoverer in every internal place. Most importantly, MethodParameter#getParameterName() uses that default discoverer as well now, so there is no need to call initParameterNameDiscovery anymore unless you got a custom discoverer to apply.

See spring-projects/spring-framework#36024

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions