【问题标题】:Apache CXF Spring Java Config for JAXWS Endpoint用于 JAXWS 端点的 Apache CXF Spring Java 配置
【发布时间】:2014-12-05 11:54:35
【问题描述】:

我正在尝试使用 java config(无 XML 配置)通过 Apache CXF 配置 Spring,并且想知道如何使用 spring java config 注册 JAXWS 端点。例如,下面 XML 配置的“java config”等价物是什么?

<jaxws:endpoint id="reportService" implementor="#reportServ" address="/reportService"/>

亲切的问候, 扎汉希尔

【问题讨论】:

    标签: spring cxf


    【解决方案1】:

    您的 XML 配置的“Java-config”等价物类似于:

    @Configuration
    public class CXFConfiguration {
    
       @Autowired
       private ReportService reportServ;
    
       @Bean
       public Endpoint endpoint() {
           Endpoint endpoint = new EndpointImpl(reportServ);
           endpoint.publish("/reportService");
           return endpoint;
       }
    
    }
    

    希望对你有帮助^^。

    【讨论】:

      【解决方案2】:

      不幸的是,据我所知,KevinHol 的回答实际上并不奏效。可以在姐妹线程 (Apache CXF + Spring Java config (no XML)) 中找到有效的答案。

      【讨论】:

        猜你喜欢
        • 2014-02-09
        • 1970-01-01
        • 1970-01-01
        • 2019-03-01
        • 2016-04-14
        • 2015-12-13
        • 1970-01-01
        • 1970-01-01
        • 2011-10-27
        相关资源
        最近更新 更多