首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >阐明框架-不使用Spring项目

阐明框架-不使用Spring项目
EN

Stack Overflow用户
提问于 2015-04-07 13:18:50
回答 1查看 483关注 0票数 0

我已经集成了阐述的框架来为Spring项目生成API文档。我遵循了https://github.com/stoicflame/enunciate/wiki/Executables中的步骤,并部署了从tomcat服务器(enunciate)中的声明配置创建的war,但是它显示了空文档。在这里,我提供了示例项目中使用的配置细节。

注意:但是类似的配置正在与泽西restful项目一起使用。我真的被困在这里了。请告诉我,这个bug是否与Spring项目的框架集成有关。提前谢谢。

项目配置:

代码语言:javascript
复制
java       -1.7.0
tomcat     -6.0 &7.0
ant        -1.9.4
spring     -4.0.5
enunciate  -1.30

罐子:

代码语言:javascript
复制
enunciate-core-1.30-RC1.jar
enunciate-core-annotations-1.30-RC1.j
enunciate-core-rt-1.30-RC1.jar
enunciate-java-client-1.30-RC1.jar
enunciate-docs-1.30-RC1.jar
enunciate-rt-1.30-RC1.jar
enunciate-spring-app-rt-1.30-RC1.jar
enunciate-spring-jaxws-rt-1.30-RC1.ja

spring-aop-4.0.5.RELEASE.jar
spring-beans-4.0.5.RELEASE.jar
spring-context-4.0.5.RELEASE.jar
spring-context-support-2.5.4.jar
spring-core-4.0.5.RELEASE.jar
spring-expression-4.0.5.RELEASE.jar
spring-jdbc-4.0.5.RELEASE.jar
spring-test-4.0.5.RELEASE.jar
spring-tx-4.0.5.RELEASE.jar
spring-web-4.0.5.RELEASE.jar
spring-webmvc-4.0.5.RELEASE.jar

这是我的enunciate.xml。

enunciate.xml

代码语言:javascript
复制
<?xml version="1.0"?>

代码语言:javascript
复制
<api-classes>
    <include pattern="com.sample.controller.*" />
</api-classes>
<modules>
    <!-- Docs -->
     <docs  title="example" copyright="Example.com"/>
     <webapp mergeWebXML="WebContent/WEB-INF/web.xml" />
    <spring-app disabled="false" springVersion="4.0.5">
        <springImport file="resources/dev/applicationContext.xml" />    
        <springImport file="WebContent/WEB-INF/rest-servlet.xml" />     
    </spring-app>
    <c disabled="true" />
    <csharp disabled="true" />
    <java-client disabled="false" />
    <cxf disabled="false" />
    <gwt disabled="false" />
    <jaxws-client disabled="true" />
    <jaxws-ri disabled="true" />
    <jaxws-support disabled="true" />
    <jersey disabled="true" />
    <xml disabled="false" />
    <obj-c disabled="true" />
    <rest disabled="false" />
</modules>

build.xml属性文件

enunciate_build.properties

代码语言:javascript
复制
JAVA_HOME=C:/Java/jdk1.7.0/
tomcat.home=D:/xampp/tomcat

这是我的build.xml

build.xml

代码语言:javascript
复制
<?xml version="1.0" encoding="UTF-8"?>
<project default = "enunciate">
    <property file ="enunciate_build.properties"/>
    <property name="lib.dir" value="../libs" />
    <property name="src.dir" value="src"/>
    <target name = "enunciate">
        <path id= "enunciate.classpath">
            <fileset dir = "${lib.dir}">
                <include name="*.jar"/>
            </fileset>
            <fileset dir ="${lib.dir}/modules/spring">
                <include name="*.jar"/>
            </fileset>  
             <fileset dir = "${JAVA_HOME}">
                <include name = "lib/tools.jar"/>
            </fileset>
        </path> 
            <taskdef name="enunciate" classname = "org.codehaus.enunciate.main.EnunciateTask">  
            <classpath refid = "enunciate.classpath"/>
            </taskdef>
            <enunciate javacSourceVersion="1.7" javacTargetVersion="1.7" basedir = "${src.dir}" configFile="enunciate.xml">
                <include name = "**/*.java"/>               
                <classpath refid= "enunciate.classpath"/>
            <export artifactId="war.file" destination="${tomcat.home}/webapps/sample_enunciate.war"/>   
            </enunciate>    

    </target>
</project>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-04-13 12:57:47

声明现在只识别JAX-RS注释。有关更多信息,请参见此链接.https://github.com/stoicflame/enunciate/issues/60

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29492635

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档