"redirect:/swagger-ui.html";
}
Now if I write :
Http://localhost/docs
It shows the below again:
Http://localhost/swagger-ui
The above is same as default.
The only difference is that user can enter "docs" endpoint but will see swagger-ui.html in address bar again.
While I want to show swagger-ui.html content under another url address.
You only can do the redirect. The swagger-ui.html is hardcoded https://springfox.github.io/springfox/docs/current/#q13
Even thogh Alex gave link to the documentation that mentions that you can't configure the sole url mapping for it, but I feel that you can create a second mapping for "/docs" to map to swagger-ui controller that serves "/swagger-ui" url. At least you can do this with full access to the source. Google something like "spring map two urls to same endpoint", try combinations of "multiple urls" or "url aliases"
https://www.baeldung.com/spring-handler-mappings
Обсуждают сегодня