空指针异常java.lang.NullPointerException: null

一、异常:

  1. 后台:java.lang.NullPointerException: null
  2. postman:“error”: “Internal Server Error”,
    使用postMan测试接口的时候出现以下异常信息
    在这里插入图片描述
    后台:空指针异常
    在这里插入图片描述

二、解决办法

1、在启动类上添加包扫描,如下:
在这里插入图片描述
2、在pom文件中添加依赖
在这里插入图片描述
3、在application.properties文件中配置mapper.xml文件的路径,如下:

猜你喜欢

转载自blog.csdn.net/weixin_47056195/article/details/112347685