springdoc swagger-ui and api-docs endpoints no longer visible in v1.4.5
Describe the bug springdoc documentation endpoints, both swagger-ui and api-docs, are visible to us in v1.4.4, but return 404s when using v1.4.5 or .6.
To Reproduce Steps to reproduce the behavior:
- What version of spring-boot you are using?
2.3.3.RELEASE
-
What modules and versions of springdoc-openapi are you using?
springdoc-openapi-ui1.4.5 or 1.4.6- We are deploying app as a WAR to wildfly, so are also using
webjars-locator-jboss-vfs0.1.0
Removed all springdoc customization from application.yml but didn't resolve the issue.
Expected behavior
- A clear and concise description of what you expected to happen.
Ability to view documentation at /api-docs and /swagger-ui.html. Both return a 404. No warning or error messages in the server log.
127.0.0.1 - - [01/Sep/2020:13:37:10 -0400] "GET /v3/api-docs HTTP/1.1" 404 286
127.0.0.1 - - [01/Sep/2020:13:37:15 -0400] "GET /swagger-ui.html HTTP/1.1" 404 286
Compare with 1.4.4 (no other changes):
127.0.0.1 - - [01/Sep/2020:13:58:12 -0400] "GET /v3/api-docs HTTP/1.1" 200 15255
127.0.0.1 - - [01/Sep/2020:13:58:19 -0400] "GET /swagger-ui.html HTTP/1.1" 302 -
127.0.0.1 - - [01/Sep/2020:13:58:20 -0400] "GET /swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config HTTP/1.1" 200 1424
127.0.0.1 - - [01/Sep/2020:13:58:20 -0400] "GET /swagger-ui/swagger-ui.css HTTP/1.1" 200 142933
127.0.0.1 - - [01/Sep/2020:13:58:20 -0400] "GET /swagger-ui/swagger-ui-standalone-preset.js HTTP/1.1" 200 311565
127.0.0.1 - - [01/Sep/2020:13:58:20 -0400] "GET /swagger-ui/swagger-ui-bundle.js HTTP/1.1" 200 1008677
127.0.0.1 - - [01/Sep/2020:13:58:20 -0400] "GET /swagger-ui/favicon-16x16.png HTTP/1.1" 200 665
127.0.0.1 - - [01/Sep/2020:13:58:20 -0400] "GET /v3/api-docs/swagger-config HTTP/1.1" 200 165
127.0.0.1 - - [01/Sep/2020:13:58:20 -0400] "GET /v3/api-docs/swagger-config HTTP/1.1" 200 165
127.0.0.1 - - [01/Sep/2020:13:58:20 -0400] "GET /v3/api-docs HTTP/1.1" 200 15255
127.0.0.1 - - [01/Sep/2020:13:58:20 -0400] "GET /v3/api-docs HTTP/1.1" 200 15255
Our pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>...</groupId>
<artifactId>...</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>...</name>
<properties>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<springdoc.version>1.4.4</springdoc.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.vladmihalcea/hibernate-types-52 -->
<!-- https://github.com/vladmihalcea/hibernate-types -->
<dependency>
<groupId>com.vladmihalcea</groupId>
<artifactId>hibernate-types-52</artifactId>
<version>2.9.13</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jdk8</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-hibernate5</artifactId>
<version>2.11.2</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.11</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springdoc/springdoc-openapi-ui -->
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>${springdoc.version}</version>
</dependency>
<!-- To run springdoc in Wildfly -->
<dependency>
<groupId>org.webjars</groupId>
<artifactId>webjars-locator-jboss-vfs</artifactId>
<version>0.1.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- TESTING -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M3</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>3.0.5</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.7</version>
<configuration>
<generateBackupPoms>false</generateBackupPoms>
<allowSnapshots>false</allowSnapshots>
</configuration>
</plugin>
</plugins>
</build>
</project>
@brotherM,
I invite you to review you configuration, because there is no issue on jboss confirmed. If you are that you are facing an issue here, then please add a minimal reproducible sample, so that ticket can be reopened.
Same issue v1.4.8, spring web 2.3.4, removing springdoc shows all endpoints and adding it it removes all endpoints. (maven)
@ciprianflow,
As suggested to @brotherM, make sure you add a minimal reproducible sample, so that ticket can be reopened. Please read at the contribution guide