강력한 API 문서를 생성하려고하는 Spring 3 애플리케이션이있다. 몇 가지 다른 프로젝트를 시도해 보았고 enunicate (http://enunciate.codehaus.org)가 필자의 요구를 충족시킬 수 있는지 알아보기 위해 형식이 올바른 문서를 생성하는 기능을 포함하고 있습니다.Enanciate를 사용하여 Spring MVC REST API 문서화
나는
<plugin>
<groupId>org.codehaus.enunciate</groupId>
<artifactId>maven-enunciate-spring-plugin</artifactId>
<version>1.27</version>
<configuration>
<configFile>enunciate.xml</configFile>
</configuration>
<executions>
<execution>
<goals>
<goal>assemble</goal>
</goals>
</execution>
</executions>
</plugin>
를 다음과 같이 내 pom.xml 파일에 의존성을 추가하고 내 응용 프로그램의 루트에 간단한 enunciate.xml 파일을 만든 :
<?xml version="1.0"?>
<enunciate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.28.xsd">
<services>
<rest defaultRestSubcontext="/"/>
<soap defaultSoapSubcontext="/"/>
</services>
<webapp mergeWebXML="src/main/webapp/WEB-INF/web.xml" />
<modules>
<spring-app disabled="false"></spring-app>
<docs docsDir="api" splashPackage="com.welflex.rest" title="Web Service API"
copyright="MyCo"/>
<obj-c disabled="true"></obj-c>
<c disabled="true"/>
<csharp disabled="true"></csharp>
<swagger disabled="false"></swagger>
</modules>
</enunciate>
언제 내 프로젝트에 대해 mvn clean 패키지를 실행하면 jax-ws 주석이있는 클래스 몇 개만 선택됩니다.
누구나 enunciate에서 작동하는 Spring/REST/JSON 컨트롤러의 작동 예제가 있습니까?
감사합니다.
링크가 중복 된 이유가 확실하지 않습니다. 이러한 링크는 이제 죽었지 만이 링크는 비슷한 문제인 것처럼 보입니다 : https://github.com/stoicflame/enunciate/issues/60. 이상하게도 당신의 얼굴은 그 문제에 .... – RustyTheBoyRobot