Skip to content

Problem with class-based projections since Spring Framework 6.1.x #3225

Closed
@sondemar

Description

@sondemar

According to the Spring Framework issue, the LocalVariableTableParameterNameDiscoverer was completely removed. As a result, the Spring Data JPA project cannot recognize the parameters of constructors for class-based projections in DTO classes that do not include parameter names in the compiled bytecode (i.e., classes compiled without the -parameters flag).

When using such DTO classes from a third-party dependency JAR, the parameter names appear as arg0, arg1, etc. The DefaultParameterNameDiscoverer now only utilizes StandardReflectionParameterNameDiscoverer, which cannot handle these parameter names. Previously, a warning would have been logged for such cases.

I have prepared an example project to demonstrate the issue.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions