IntelliJ抱怨OSGi引用属性

时间:2012-08-30 09:59:16

标签: java spring intellij-idea osgi

我的OSGi配置文件中有spring-context.xml引用。当我指定:

<osgi:reference id="cxfInboundLoggingInterceptor" interface="com.groupgti.esb.cxf.interceptors.MessageLoggerInbound" />

IntelliJ说:Attribute id is not allowed here。我的osgi前缀指向此架构:xmlns:osgi="http://www.springframework.org/schema/osgi"

架构位置:

http://www.springframework.org/schema/osgi                  http://www.springframework.org/schema/osgi/spring-osgi.xsd

来自Spring OSGi documentation

  

<osgi:reference>元素用于定义充当OSGi服务(或服务集)代理的本地bean。唯一需要的   属性是id(定义本地bean的名称)和   interface(定义接口的完全限定名称)   目标服务已注册)。

所以我看到id是必需的,但为什么然后IntelliJ抱怨它呢?

3 个答案:

答案 0 :(得分:2)

我已在JetBrains Tracker

中创建了此错误的故障单

答案 1 :(得分:0)

我注意到osgi xsd确实

<xsd:import namespace="http://www.springframework.org/schema/beans"/>
<xsd:import namespace="http://www.springframework.org/schema/tool"/>

对我而言,他们没有找到。但即使你设置它们似乎也不起作用。

您可能需要在http://youtrack.jetbrains.com/issues/IDEA为IntelliJ提交错误报告。

答案 2 :(得分:0)

也许您需要限定id属性:xml:id?