一。问题描述 SSM项目开发中报错:严重: Servlet.service() for servlet [springMVC] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause 二。错误原因 controller类中声明service时没有加注解**@service** 三。解决方法 加上注解**@service**