I'm posting it here because I don't know who's fault it is, whether it's Srping or Gradle's.
https://github.com/gradle/gradle/issues/30267
Comment From: drakgoku
Check the method parameters annotation: Make sure that the method that is causing the problem has the parameters correctly annotated.
In my case in the controller:
@GetMapping(value = { path + "/{id}" })
public ResponseEntity<?> findById(@PathVariable Long id) {
I have to specify the variable name for integration tests. It seems that it is mandatory.
@GetMapping(value = { path + "/{id}" })
public ResponseEntity<?> findById(@PathVariable("id") Long id) {
We changed
(@PathVariable Long id) to (@PathVariable("nameParameter") Long id).
And:
tasks.withType<JavaCompile>().configureEach {
options.compilerArgs.add("-parameters")
}
I seem to remember that in the past it was not necessary.
Comment From: scottfrederick
See https://github.com/spring-projects/spring-framework/issues/31675
Comment From: drakgoku
I'll clarify the duplicate case. It's not really a duplicate even though it may seem like it.
The fact of having the "-parameters" didn't make it work as I explained in the post that I suppose you've read.
and as I put in this post, you have to specify the name of the parameter ("nameParams") to the parameter type. Otherwise, it won't work no matter how much you have "-parameters"
Regards.
Comment From: scottfrederick
I removed the duplicate tag right after I added it, because I realized it might not be a true duplicate of the linked issue. Regardless of that, the behavior you are describing is in Spring Framework, and Spring Boot has no control over it. If you have further questions about how this is working, the Spring Framework issue tracker or StackOverflow would be the places to follow up.