I am migrating my spring boot application from 1.5.x to 2.3.x. After updating the required dependencies, in a controller having below method, getting one error:
@RequestMapping(value= "/test", method = RequestMethod.POST)
public ResponseEntity<MyResult> getTestRes(
@RequestParam("test1") final String test1,
@RequestParam("test2") final String test2,
@RequestParam("test3") final String test3,
@RequestParam Map<String, String> reqParam,
final HttpServeletRequest req) throws Exception {
//method body.....
}
When i try to build the application, i get below error:
[ERROR] Cant use non-primitive type: java.util.Map<java.lang.String, java.lang.String> as request parameter.
I am using Spring boot 2.3.9.RELEASE version with Spring framework 5.2.13.RELEASE.
Please let me know how can i resolve this issue.
Thanks
spring-boot-starter-parent 2.3.9.RELEASEonly.