Swagger UI is not rendering on the browser

date
Aug 1, 2022
slug
swagger-ui-not-rendering
status
Published
tags
Bugfix
API
REST
Spring Boot
Swagger
summary
type
Post

Background

I was going to document my Dog REST API with these two dependencies for Swagger:

Problem

When I tried to load the Swagger UI by navigating to http://localhost:8080/swagger-ui.html, the following error was displayed on the browser:
notion image

What’s wrong

From Swagger 3.0, we don’t need to add those two dependencies into the build tool. springfox-boot-starter should be added instead.

Solution

Replace those two dependencies with springfox-boot-starter dependency:

References


© Foy Wan 2022 - 2025