【问题标题】:Why is intelliJ not using the correct version of .xsd file为什么 intelliJ 没有使用正确版本的 .xsd 文件
【发布时间】:2013-07-22 18:26:39
【问题描述】:

这是我的 spring-security.xml 文件

<beans:beans xmlns="http://www.springframework.org/schema/security"
             xmlns:beans="http://www.springframework.org/schema/beans"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    http://www.springframework.org/schema/security
    http://www.springframework.org/schema/security/spring-security-3.0.xsd">

所以最后一行指定了 3.0 版本,这是一个有效的 xsd 文件,如果您访问它会显示架构的 URL。如果我在那个 xsd 上使用 COMMAND + B,它会将我带到 2.0 版本。

我知道我的计算机上存在一个 3.0.8 spring-security xsd 文件,intelliJ 就是不会使用它(即使它下载了它!)。

如何手动将此 xsd 文件放入我的项目中?

【问题讨论】:

  • 也许您的类路径中有旧版本的 Spring Security?在 URL 上使用 Ctrl + 鼠标悬停,IntelliJ 将显示它在文件系统中找到 XSD 的位置。
  • 感谢这解决了我的问题。

标签: spring intellij-idea xsd


【解决方案1】:

我遇到了同样的问题,我通过从应用程序中删除 spring-dao jar 解决了它。以下链接将为您提供更多详细信息: https://jira.spring.io/browse/SPR-4161

【讨论】:

    【解决方案2】:

    删除 sping-dao jar 文件对我有用。 在下面的 spring-aop 依赖项中添加。

    <exclusion> 
      <groupId>org.springframework</groupId>
      <artifactId>spring-dao</artifactId>
    </exclusion>
    

    【讨论】:

      猜你喜欢
      • 2016-01-16
      • 2020-05-19
      • 1970-01-01
      • 2019-05-19
      • 1970-01-01
      • 2013-06-22
      • 2021-12-20
      • 2014-08-13
      • 2021-09-21
      相关资源
      最近更新 更多