是因为自己springmvc的配置文件里面不小心删除掉了
<!-- 注解扫描 扫描该包下的注解--> <context:component-scan base-package="com.shanheyongmu.controller" />