严重: Servlet.service() for servlet [springMVC] in context with path [] threw exception [Request proce

一。问题描述

SSM项目开发中报错:严重: Servlet.service() for servlet [springMVC] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause

严重: Servlet.service() for servlet [springMVC] in context with path [] threw exception [Request proce_第1张图片

二。错误原因

controller类中声明service时没有加注解**@service**
严重: Servlet.service() for servlet [springMVC] in context with path [] threw exception [Request proce_第2张图片

三。解决方法

加上注解**@service**

你可能感兴趣的:(java,spring,bug)