Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@PathVariable throw an error after ignoring value in Spring Boot 3.2.0. #38621

Closed
tangllty opened this issue Dec 1, 2023 · 1 comment
Closed
Labels
status: duplicate A duplicate of another issue status: invalid An issue that we don't feel is valid

Comments

@tangllty
Copy link

tangllty commented Dec 1, 2023

jdk: openjdk 17
springboot: 3.2.0
mybatis: 3.0.3

If the parameter name of @PathVariable is the same as the parameter name of the url, value can be ignored.

But when I upgraded from 3.1.5 to 3.2.0, the program throws the following error

Name for argument of type [java.lang.String] not specified, and parameter name information not found in class file either.

This is the normal code before I upgraded.

image

Code: https://github.com/tangllty/tang-boot/blob/master/tang-system/src/main/java/com/tang/system/controller/dict/SysDictDataController.java#L58-L61
Repository: https://github.com/tangllty/tang-boot/
WebSite: https://github.com/tangllty/tang-boot

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Dec 1, 2023
@bclozel
Copy link
Member

bclozel commented Dec 1, 2023

I think this is due to https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.2-Release-Notes#parameter-name-discovery

You should have gotten WARN logs with Spring Boot 3.1.x about this. Please compile your code with the -parameters compiler option. See also spring-projects/spring-framework#31675

@bclozel bclozel closed this as not planned Won't fix, can't repro, duplicate, stale Dec 1, 2023
@bclozel bclozel added status: duplicate A duplicate of another issue status: invalid An issue that we don't feel is valid and removed status: waiting-for-triage An issue we've not yet triaged labels Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

3 participants