Swagger UI in Spring 6 (without springboot)

274 Views Asked by At

I am migrating a Spring application from 5.x to 6, and struggling to generate the swagger ui for it.

I am removed all springfox dependencies and added springdoc ones.

I managed to make the api doc works fine (localhost:1010/v3/api-docs), but the swagger UI is giving a 404 error (localhost:1010/v3/swagger-ui/index.html).

Can someone please help here?

1

There are 1 best solutions below

1
On

Check whether u have correct dependencies in your pomxml - springdoc-openapi-ui and springdoc-openapi-webmvc-core Configure swagger-ui.path in your properties files .

You get 404 when the page is not found ,so configure the above things properly