jackyrar 发表于 2017-2-2 06:55:47

CXF (不依赖Spring)怎么在tomcat下部署Service??

CXF说实现了JAX-WS2.0规范,那么在不借助于Spring的情况下怎么在tomcat下部署服务??我的意思是说在不引入Spring支持的情况下,直接通过WebService这样的标注,而不需要Spring配置文件(甚至jar),是否可以达到在Tomcat下部署Service的目地?

不过好象CXF是基于Spring的,所以依然要提供Spring的jar包,可能还要提供

    <import resource="classpath:META-INF/cxf/cxf.xml" />
    <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
    <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />

这样的Spring配置,但我想不提供

    <jaxws:endpoint id="CollectiveServices"
      implementor="demo.spring.HelloWorldImpl" address="/HelloWorld">
      <jaxws:serviceFactory>
            <ref bean="jaxWsServiceFactoryBean"/>
      </jaxws:serviceFactory>
    </jaxws:endpoint>

这样的配置总可以吧??因为CXF说是实现了JAX-WS2规范嘛。
不知道我这样想是否正确,??
页: [1]
查看完整版本: CXF (不依赖Spring)怎么在tomcat下部署Service??