Skip to content

GenericTypeResolver Since 6.2.0, generics cannot be obtained correctly in multi-layer interface inheritance (possible regression of #24963) #34386

@fangzhengjin

Description

@fangzhengjin

Minimal sample application: https://github.com/fangzhengjin/spring-framework-issues-34386

Start the program and execute the request below.

Observe the input arguments to the com.example.demo.IQueryController#test method.

curl -X POST 'localhost:8080/test' -H 'Content-Type: application/json' -d '{"data":{"name":"test"}}'

This problem occurs when the generic names declared by IQueryController and ICrudController are inconsistent in the example project.

Expected behavior:

public interface IQueryController<Entity>

public interface ICrudController<Entity> extends IQueryController<Entity>

Unexpected behavior:

public interface IQueryController<QueryParam>

public interface ICrudController<Entity> extends IQueryController<Entity>

6.2.x

Image

Image

6.1.x

Image

Image

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: feedback-providedFeedback has been providedtype: regressionA bug that is also a regression

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions