先检查spring-servlet.xml和application-context.xml里扫描packet的时候是否都有扫描到 如果没问题就在@Controller @Service后面加上(name="xxxBean") 然后再用spring的web工厂getBean就能取到