如图,配置spring-mvc文件时,项目启动报错。

配置spring文件时项目启动不了--cvc-elt.1: Cannot find the declaration of element 'beans'.

配置spring文件时项目启动不了--cvc-elt.1: Cannot find the declaration of element 'beans'.

其中,我的配置文件如下。

配置spring文件时项目启动不了--cvc-elt.1: Cannot find the declaration of element 'beans'.配置spring文件时项目启动不了--cvc-elt.1: Cannot find the declaration of element 'beans'.配置spring文件时项目启动不了--cvc-elt.1: Cannot find the declaration of element 'beans'.

配置spring文件时项目启动不了--cvc-elt.1: Cannot find the declaration of element 'beans'.

百思不得其解,后来才发现xmlns:schemaLocation写错了,应该是xsi:schemaLocation


改正后的配置截图如下。

配置spring文件时项目启动不了--cvc-elt.1: Cannot find the declaration of element 'beans'.

配置spring文件时项目启动不了--cvc-elt.1: Cannot find the declaration of element 'beans'.

至此,项目就可以启动了。


相关文章:

  • 2021-06-03
  • 2021-09-19
  • 2021-12-27
  • 2022-01-18
  • 2021-10-19
  • 2021-12-28
  • 2022-12-23
  • 2021-07-04
猜你喜欢
  • 2021-09-21
  • 2021-06-23
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
  • 2021-09-19
相关资源
相似解决方案