【发布时间】:2023-03-23 11:43:01
【问题描述】:
我正在使用Spring 和CXF 创建一个soap web 服务客户端。启用日志记录 + gzip 压缩的首选方法是什么?应该使用注释还是直接以编程方式添加功能?
@Component
@WebService
@GZIP
@Logging(pretty = true)
public class SoapService {
}
或
EndpointImpl end = new EndpointImpl(new SpringBus(), new SoapService());
LoggingFeature feature = new LoggingFeature();
feature.setPrettyLogging(true);
end.getFeatures().add(feature);
end.getFeatures().add(new GZIPFeature());
end.publish("/SoapService");
这有关系吗?你喜欢什么?
【问题讨论】:
标签: java spring web-services soap cxf