我们一直在使用泽西岛为我们的web服务,这是伟大和直接。有没有一种方法来添加一个方法定义内的小说明注释(可能使用像@Description注释):添加方法评论泽西岛
@GET
@Path("/schema/classes/")
@Produces({ APPLICATION_RDF, TEXT_N3, APPLICATION_JSON })
@Description("Lists all ontology classes")
public Response getClasses() throws JobOntoException {
...
}
而在WADL会看到这样的信息:
<application>
<doc jersey:generatedBy="Jersey: 1.1.5 01/20/2010 03:55 PM"/>
<resources base="http://localhost:9998/">
<resource path="/jobonto">
<resource path="/schema/classes/">
<method name="GET" id="getClasses">
**<description>"Lists all ontology classes"</description>**
<response>
<representation mediaType="application/rdf+xml"/>
<representation mediaType="text/rdf+n3"/>
<representation mediaType="application/json"/>
</response>
</method>
</resource>
...
谢谢, Renaud
这两个链接都被打破;我不确定,但我想这是新地址:https://github.com/jersey/jersey-1.x/tree/master/samples/extended-wadl-webapp – lapo 2017-10-04 14:24:43