【问题标题】:Intellij IDEA parse custom bean - cannot find custom handler for namespaceIntellij IDEA 解析自定义 bean - 找不到命名空间的自定义处理程序
【发布时间】:2014-03-06 19:32:42
【问题描述】:
<camel:camelContext id="myCamelContext">
    <camel:routeBuilder ref="route"/>
</camel:camelContext>

我尝试在 Intellij IDEA 中解析上面的 bean(“Parse custom bean”),但得到以下错误:

找不到命名空间“http://camel.apache.org/schema/spring”的自定义处理程序

IDE 还会在我的测试代码中显示任何对应的 @Autowired 注释的错误,尽管测试运行成功。该应用程序在运行时工作,我将骆驼弹簧作为 Maven 依赖项。它只是在 IDE 中存在问题。

【问题讨论】:

    标签: spring maven intellij-idea


    【解决方案1】:

    camel-spring maven 依赖项处于“运行时”范围。虽然从技术上讲这是正确的,但这使得 Intellij 在编码时无法使用它。将 maven 范围更改为“编译”使 Intellij 能够使用骆驼弹簧 bean 处理程序来解释 bean。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-08-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-15
    • 2015-02-02
    • 1970-01-01
    • 2010-12-26
    相关资源
    最近更新 更多