How to display app API documentation by using springbok open-air we flux UI

I read this documentation to use springdoc-openapi-webflux-ui. As documentation said I just added springdoc-openapi-webflux-ui library to my app: implementation('org.springdoc:springdoc-openapi-webflux-ui:1.2.26')

Additionally, I customized path to API in application.yml:

    path: /swagger-ui.html

When I start app, and go to http://localhost:8080/swagger-ui.html, it redirects me to http://localhost:8080/webjars/swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config. In that page, I got an error:

Whitelabel Error Page
This application has no configured error view, so you are seeing this as a fallback.
Mon Jan 20 05:16:10 UTC 2020
[7192d9dc] There was an unexpected error (type=Not Found, status=404).
No matching handler

Question is: Should I add additional configurations to my app to show API documentation?

This Post Has One Comment

  1. No Fault

    you just need to add the dependency of the springdoc-openapi-webflux-ui.


    ou can have a look at the demos code:
    You can check you classpath, and try to run the application from outside the IDE. Make sure you have the correct settings of your IDE depending on your build Tools:
    Also, please check if you are using @EnableWebFlux.

    As stated in the Spring Boot reference documentation, when you use @EnableWebFlux, you tell Spring Boot that you wish to take full control over the WebFlux configuration and disable all auto-configuration for this

    You have two solutions:

    Remove @EnableWebFlux
    If you really want take control of Bean creation and you want absolutely to use @EnableWebFlux, then you need to add an implementation of Web Flux Configure.

Leave a Reply