Swagger UI在位置url中显示$ {pageContext.request.contextPath}

时间:2015-09-25 11:52:03

标签: java spring-boot swagger swagger-ui

我刚刚将Swagger添加到我的网络应用程序中,但是当我显示UI时,位置网址会显示:

http://localhost:8080${pageContext.request.contextPath}/api-docs

我查看了Unable to get Swagger UI working with Spring bootNot getting things working with Spring Boot,并按建议添加了tomcat-embed-jasper依赖项

<dependency>
    <groupId>org.apache.tomcat.embed</groupId>
    <artifactId>tomcat-embed-jasper</artifactId>
    <scope>provided</scope>
</dependency>

但我仍然可以在网址中看到${pageContext.request.contextPath}。我使用1.0.2版本swagger-springmvc0.4版本swagger-spring-mvc-ui

    <dependency>
        <groupId>com.mangofactory</groupId>
        <artifactId>swagger-springmvc</artifactId>
        <version>1.0.2</version>
    </dependency>
    <dependency>
        <groupId>org.ajar</groupId>
        <artifactId>swagger-spring-mvc-ui</artifactId>
        <version>0.4</version>
    </dependency>

非常感谢任何有关如何解决此问题的帮助或建议。

0 个答案:

没有答案