有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

camel上下文xml文件中的java-swagger配置

是否可以在camel spring应用程序中配置swagger。我曾尝试在camel blueprint xml及其工作模式中进行swagger集成,但未能与camel spring应用程序集成

在blueprint xml文件中添加了以下配置

<service interface="javax.servlet.http.HttpServlet">
        <service-properties>
            <entry key="alias" value="/api-docs/*" />
            <entry key="init-prefix" value="init." />
            <entry key="init.base.path" value="//0.0.0.0:8080/rest" />
            <entry key="init.api.path" value="//0.0.0.0:8181/api-docs" />
            <entry key="init.api.title" value="Camel Rest Example API" />
            <entry key="init.api.version" value="1.2" />
            <entry key="init.api.description" value="Camel Rest Example with Swagger that provides an User REST service" />
        </service-properties>
        <bean class="org.apache.camel.component.swagger.DefaultCamelSwaggerServlet" />
    </service>

您能否在camel-spring上下文xml文件中帮助完成相同的配置。提前预定

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cxf="http://camel.apache.org/schema/cxf"
    xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:mongo="http://www.springframework.org/schema/data/mongo"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:util="http://www.springframework.org/schema/util" xmlns:camel="http://camel.apache.org/schema/spring"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
       http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
       http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo-1.5.xsd
       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
       http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
       http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd       
       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">

<required code>
</beans>

共 (0) 个答案