Tag Archives: Whitelabel page error

[Solved] Whitelabel page error when using Swagger2 in SpringBoot

Use the latest version of Swagger today, introduced in pom.xml

    < dependency > 
        < groupId > io.springfox </ groupId > 
        < artifactId > springfox-swagger2 </ artifactId > 
        < version > 3.0.0 </ version > 
    </ dependency > 
    < dependency > 
        < groupId > io.springfox </ groupId > 
        < artifactId > springfox-swagger-ui </ artifactId > 
        < version >3.0.0</ version > 
    </ dependency >

After other things are done, visit  http://localhost:8080/swagger-ui.html and there is an error like the title.

The solution is as follows:
replace the pom.xml content with

< dependency > 
    < groupId > io.springfox </ groupId > 
    < artifactId > springfox-boot-starter </ artifactId > 
    < version > 3.0.0 </ version > 
</ dependency >

Access:  http://localhost:8080/swagger-ui/
Note that the last slash /must not be less

Pro test is easy to use, no need to access the file at the end of .html