Spring 3SWS2:<context:component-scan>和<sws:annotation-driven>之间的区别

问题描述

| 当尝试一个仅带有一个带注释的“ 0”类的简单Web Service Hello World示例时,使用“ 1”命名空间时不会注册端点。 但是,通过添加通常的“ 2”,一切正常,可以正确注册Endpoint类。 这仅对于
@Endpoint
注释正确,所有其他注释(
@RequestPayload
@ResponsePayload
@PayloadRoot
)将按预期由sws-namespace注册。 namespace0ѭ注释是否也不能由该命名空间处理?
<beans>
   <!-- works for all annotations except @Endpoint -->
    <sws:annotation-driven/>

    <!-- when activated,@Endpoint is registered correctly <context:component-scan/> -->
</beans>
    

解决方法

        这是一个已知的SWS错误:https://jira.springsource.org/browse/SWS-702。     ,        现在,两者都用于:
<context:component-scan base-package=\"com.coral.project.endpoints\"/>

<sws:annotation-driven marshaller=\"marshaller\" unmarshaller=\"marshaller\"/>
这会发现@Endpoint和@ PayloadRoot,@ ResponsePayload批注。 这是他们在Spring-WS参考中告诉您的方法: http://static.springsource.org/spring-ws/sites/2.0/reference/html/tutorial.html#tutorial.implementing.endpoint     

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...