Why does springfox-swagger2 UI tell me “Unable to infer base url.” August 16, 2023 by Tarik I was able to resolve the issue by adding SpringBootApplication with annotation – as suggested by Mark : @EnableSwagger2