官方解释地址:http://cxf.apache.org/docs/annotations.html
org.apache.cxf.annotations.WSDLDocumentation
org.apache.cxf.annotations.WSDLDocumentationCollection(自2.3起)
对于从Java接口/代码派生WSDL的“Java first”场景,这些注释允许将wsd:documentation元素添加到生成的wsdl中的各个位置。
@WebService
@WSDLDocumentationCollection(
{
@WSDLDocumentation("My portType documentation"),
@WSDLDocumentation(value = "My top level documentation",
placement = WSDLDocumentation.Placement.TOP),
@WSDLDocumentation(value = "My binding doc",
placement = WSDLDocumentation.Placement.BINDING)
}
)
public interface MyService {
@WSDLDocumentation("The docs for echoString")
String echoString(String s);
}
对接口,和方法都可以添加中文注释。
最终效果类似这样: