僅當使用一個@Endpoint
註釋類嘗試簡單的Web Service Hello World示例時,Endpoint未使用<sws:annotation-driven/>
命名空間。Spring 3(SWS2):<context:component-scan>和<sws:annotation-driven>之間的差異
但是,通過添加通常的<context:component-scan>
,一切正常,端點類正確註冊。 這僅適用於@Endpoint
註釋,所有其他註釋(@RequestPayload
,@ResponsePayload
,@PayloadRoot
)將按照預期由sws名稱空間進行註冊。
@Endpoint
註釋是否也不會被該名稱空間處理?
<beans>
<!-- works for all annotations except @Endpoint -->
<sws:annotation-driven/>
<!-- when activated, @Endpoint is registered correctly <context:component-scan/> -->
</beans>
你能告訴我地址,以這個例子嗎?我很難找到好的Spring WS 2教程。 – Jaanus 2011-09-27 16:04:40