Springwolf http://localhost:8080/springwolf/docs page 404

236 views Asked by At

I am giving a try to Springwolf to generate the documentation of my RabbitMQ Spring back-end code, and I managed to display the http://localhost:8080/springwolf/asyncapi-ui.html page.

1. Problem

The http://localhost:8080/springwolf/asyncapi-ui.html page only shows this:

Springwolf 

API VERSION - AsyncAPI JSON file

Servers
Channels

Semantics of publish and subscribe:

publish  means publish an event to the channel and this application will receive it
subscribe  means subscribe to this channel to receive events published by this application

Schemas

whereas it should display a full list of info similar to this page: https://demo.springwolf.dev/springwolf-ui/asyncapi-ui.html

2. Investigation

After investigating I noticed that the asyncapi-ui.html does an http request towards

http://localhost:8080/springwolf/docs 

and this returns an "HTTP Status 404 – Not Found" !

It's as if this url was not handled by Springwolf.

I read the documentation https://www.springwolf.dev/docs/configuration/ and tried to change the url of the docs (I know it does break the Springwolf HTML UI, but I am just investigating to understand what's going on).

So I set this in application.yml:

springwolf:
  paths:
    docs: /springwolf/testdocs

and then I opened

http://localhost:8080/springwolf/testdocs

it does not work!
Also, in application yml, IntelliJ does underline "docs:" and a popup say:

cannot resolve configuration property 'springwolf.paths.docs' 

I now deleted this springwolf.paths.docs parameter, but I wonder why, when I set it , I have this popup. Did this parameter changed ?

3. Questions

  • How is that /springwolf-ui/asyncapi-ui.html page is displayed but /springwolf-ui/docs returns a 404.
    How can I fix this 404?
  • Should I be worried about IntelliJ says "cannot resolve configuration property 'springwolf.paths.docs'" about "docs:' application yaml parameter?

Thanks in advance for your help.

1

There are 1 answers

0
Pascal On BEST ANSWER

The reason is that my project uses Spring Boot 2.7 & Spring 5, but Springwolf requires Spring Boot 3 & Spring Framework 6.

One can still use Springwolf with Spring Boot 2.7 and Spring 5 using some 'hack' (I managed to do so), but I would recommend to just use Spring Boot 3.

More info about that here: