栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

500错误Error creating bean with name ‘xxxxController‘Servlet[spriServlet.init()ngmvc]的引发异常

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

500错误Error creating bean with name ‘xxxxController‘Servlet[spriServlet.init()ngmvc]的引发异常

今天整合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

 

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/1014146.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号