2023-05-02 16:28:56.358 ERROR 21752 --- [nio-8888-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root causejava.lang.NullPointerException: null
首先检查实现类里的 @Service和 @Autowired有没有写
其次检查Controller里的 service 每一个都得@Autowired,其实主要是需要用到的那个需要添加@Autowired
小粗心大问题。