用spring和web整合时加载页面出现报错,如图下所示:

用spring和web整合时加载页面出现报错The server encountered an internal error that prevented it from fulfilling thi

打开Tomcat启动日志看看发现提示如图:

用spring和web整合时加载页面出现报错The server encountered an internal error that prevented it from fulfilling thi

就是说tomcat服务器没有加载到spring.XML配置文件

仔细查找了一下原因,原来我的web.xml文件放在了WebContent的目录下,所以没有加载得到web.xml,这样当然也没有加载得到spring.xml

用spring和web整合时加载页面出现报错The server encountered an internal error that prevented it from fulfilling thi

把web.xml重新放回到WEB-INF目录下重启tomcat服务器就可以了

用spring和web整合时加载页面出现报错The server encountered an internal error that prevented it from fulfilling thi

虽然不是什么大问题但这些小细节还是要注意一下

相关文章:

  • 2021-05-09
  • 2021-06-27
  • 2021-08-25
  • 2022-01-13
  • 2022-12-23
  • 2021-12-25
  • 2021-12-25
猜你喜欢
  • 2021-12-20
  • 2021-12-01
  • 2021-10-29
  • 2022-12-23
  • 2021-06-25
  • 2022-12-23
相关资源
相似解决方案