简体   繁体   English

如何禁用Apache CXF

[英]How to disable Apache CXF

I've recently introduced Apache CXF into my web-service handling module to allow me to use some advanced features that it offers. 我最近在我的网络服务处理模块中引入了Apache CXF,允许我使用它提供的一些高级功能。

Unfortunatelly I cannot find any kind of trigger to enable/disable using CXF in runtime. 不幸的是,我找不到任何类型的触发器来在运行时启用/禁用CXF。 I got dozens of applications reusing parts of that module and I don't want all of them to use CXF in runtime only because its libraries are on the classpath. 我有几十个应用程序重用该模块的部分,我不希望所有这些应用程序仅在运行时使用CXF,因为它的库位于类路径上。 CXF, as great as it is introduces some bugs or alters the behaviour of the application significantly so I need a way to disable it where its not necessary. CXF,尽管它会引入一些错误或改变应用程序的行为,因此我需要一种方法来禁用它不必要的地方。

Is there some kind of system property or something I can use so that the CXF libraries are ignored in the runtime? 是否有某种系统属性或我可以使用的东西,以便在运行时忽略CXF库?

So far the best way I found to switch between CXF and standard java jax-ws implementation is using appropriate provider, by setting either 到目前为止,我发现在CXF和标准java jax-ws实现之间切换的最佳方法是使用适当的提供程序,通过设置

Djavax.xml.ws.spi.Provider=org.apache.cxf.jaxws.spi.ProviderImpl

or 要么

Djavax.xml.ws.spi.Provider=com.sun.xml.internal.ws.spi.ProviderImpl

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM