控制台警告:
2023-04-05T00:36:53.641+08:00 WARN 20224 --- [p-nio-80-exec-4] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.method.annotation.MethodArgumentTypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'int'; For input string: "pages"]
这是后台的方法参数类型匹配不上导致的?有一个pages这个参数,参数是int类型的,但前台给了一个字符串,而且是无法转换的字符串。仔细检查一下请求的参数列表
Failed to convert value of type 'java.lang.String' to required type 'int'; For input string: "pages"
参数要求是Int ,但是请求的时候给了一个string, 注意调整下入参类型就可以解决
字符串转int异常,具体看看错误信息 应该会有更详细的log