我在我的spring-context.xml
配置文件中有一個OSGi
參考。當我指定:IntelliJ抱怨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"
和Schema位置:
http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd
從Spring
OSGi
documentation:
的
<osgi:reference>
元素用於定義一個本地bean充當一個OSGi服務(或一組服務)的代理。唯一需要的 屬性是id(它定義了本地bean的名稱)和 接口(它定義了目標服務在其下注冊的接口 的全限定名稱)。
所以我看到這個ID是必需的,但爲什麼IntelliJ
是抱怨呢?
我花了幾個小時,試圖找出同樣的問題,但沒有成功。我懷疑這是一個IDEA錯誤,現在我忽略它。 –
是否可以禁止檢查(任何想法是哪一個?)來抑制這些錯誤? – vikingsteve