我們一直在使用澤西島爲我們的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