【发布时间】:2012-08-30 09:59:16
【问题描述】:
我的spring-context.xml 配置文件中有一个OSGi 参考。当我指定时:
<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
来自SpringOSGidocumentation:
<osgi:reference>元素用于定义充当 OSGi 服务(或服务集)代理的本地 bean。唯一需要的 属性是 id(定义本地 bean 的名称)和 接口(定义接口的全限定名 目标服务注册在)。
所以我看到 id 是必需的,但为什么 IntelliJ 抱怨它?
【问题讨论】:
-
我花了几个小时试图找出同样的问题,但失败了。我怀疑这是一个 IDEA 错误,现在我忽略了它。
-
可以禁用检查(知道是哪一个吗?)以抑制这些错误?
标签: java spring intellij-idea osgi