0
자원 클래스는 다음과 같이 정의된다 :Enunciate : 내 wadl에서 모든 리소스 경로 속성 앞에 "/ rest"가 붙는 이유는 무엇입니까?
@Path("v1")
@Produces({MediaType.APPLICATION_JSON})
@Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
public class RestApi {
그리고이 방법은 다음과 같이 정의 :
@GET
@Path("patients")
public String patients(
나는 enunciate 문서의 목표, 생성 된 WADL의 외모를 실행 받는다는 명령을 실행하면 like :
<?xml version="1.0" encoding="UTF-8"?>
<wadl:application xmlns:wadl="http://wadl.dev.java.net/2009/02" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<wadl:doc xmlns:enunciate="http://enunciate.codehaus.org/" enunciate:generatedBy="Enunciate-1.27"/>
<wadl:grammars>
<wadl:include href="ns0.xsd"/>
</wadl:grammars>
<wadl:resources base="http://localhost:8888/app/api">
...
<wadl:resource path="/rest/v1/patients">
<wadl:method name="GET">
리소스 경로에서 "/ rest /"가 어디입니까? 내 프로젝트에서 어디에서나 검색해 봤지만 참조가 없습니다.
<enunciate label="Rest API"
xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.28.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<deployment host="localhost:8888" context="/app/api"/>
</enunciate>