I am upgrading my springboot application from springboot 2.9.7 to springboot 3.0.2. While doing clean build, I am getting below error related to Rest API calls (using Rest template).
Caused by: java.lang.NoSuchMethodError: 'org.springframework.http.HttpStatus org.springframework.http.ResponseEntity.getStatusCode()'
As per my understanding it has something to do with upgarde happening to springframework to some 6.. version due to upgrade in springboot version to 3.0.2.
Anyone has faced this issue? how this can be fixed.
It's a gradle project. I have added below configuration related to spring boot upgrade.
springBootVersion = '3.0.2'
Other than that , its a simple spring boot microservice where we have one endpoint, which calls internally another Rest API etc.
I have only changed spring boot version from 2.9.7 to springboot 3.0.2, and it started to fail with above mentioned error.