Multiple annotations found at this line:
- schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/context/spring-beans-4.2.xsd', because 1) could not find the document; 2) the document could
not be read; 3) the root element of the document is not <xsd:schema>.
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'context:property-placeholder'.
网上有很多处理方式,我也参考了https://blog.youkuaiyun.com/bluishglc/article/details/7596118
这个作者的内容,里面讲的稍微详细点,但个人觉得最直接快捷的方式还是直接放包,
上图报错spring-beans-4.2.xsd 找不到。
但是我的所有配置文件里面都没有找到相关配置,个人配的是 3.2的,所以很有可能是其他包里面又依赖了 spring-beans-4.2.xsd,因此才会报这个错,这个问题联网的时候基本不会出现,因为它会直接去网络下载。本人有时候需要内网启动项目,因此,直接去下载了4.2以上的版本
直接放到配置的版本相同位置,本人的路径如下
我的项目时放在工作空间中,因此包也在项目的lib下,与配置的3.2依赖包同一位置,如下图,可以看到我有两个包,3.2.9和4.2.4,现在项目正常启动了
或者直接不用下包 直接把spring-beans-3.2.9.RELEASE.jar的包复制改名称缺失版本的包,如直接改成spring-beans-4.2.4.RELEASE.jar 即可。
个人感觉这样直接明了点