今天整合spring+springmvc+mybatis是出现了这个错误。
先整合的springmvc运行没有问题。
然后整合的mytatis,也可以查出数据,没有问题。
但是在controller调用service接口是报500错误
我这里web.xml中init配置的是spring-mvc.xml文件
我这里是spring-mvc.xml与spring-service.xml没有整合到一起,意思就是在spring-mvc中没有spring-service.xml的配置,也就是说spring-mvc.xml没有service层的bean,测试的话可以在spring-mvc.xml中引入spring-service.xml
但是没这么做的,直接创建个appcationContext.xml中,做三个文件的整合
然后web.xml的servlet标签的init中引用applicationContext.xml


![500错误Error creating bean with name ‘xxxxController‘Servlet[spriServlet.init()ngmvc]的引发异常 500错误Error creating bean with name ‘xxxxController‘Servlet[spriServlet.init()ngmvc]的引发异常](http://www.mshxw.com/aiimages/31/1014146.png)
