【问题标题】:STS application applicationContext.xml validationSTS 应用程序 applicationContext.xml 验证
【发布时间】:2015-02-05 14:20:15
【问题描述】:

我注意到,即使未指定 xsi:schemaLocation,STS 也能成功验证 applicationContext.xml 文件。我还检查了 STS Preferences > XML Catalogs and spring xsd are not specified there

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

     <xbean id="cross" class="mypackage.spring.Cross" scope="prototype">
    </xbean>

</beans>

【问题讨论】:

  • 问题是……?
  • 如何验证xml?

标签: xml eclipse spring


【解决方案1】:

我建议编写 Spring Smoke 集成测试。它不需要测试任何东西,只需上下文启动(你会惊讶地发现它发现了多少错误)。

【讨论】:

    【解决方案2】:

    可能是因为 xsd 正在缓存而执行了验证,请查看Preferences-&gt;General-&gt;Network connections-&gt;Cache

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-08-27
      • 1970-01-01
      • 1970-01-01
      • 2011-09-17
      • 2011-12-28
      • 1970-01-01
      • 2011-07-13
      相关资源
      最近更新 更多