java.lang.NullPointerException: null

Error: Request failed with status code 500

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause

出现的问题

  • Knife4j文档请求异常,浏览器报错:

content-801

  • 项目控制台报错:

content-802

原因分析

content-803

解决方案

  • 改成与接收的参数名保持一致即可。