Spring-boot – How to change swagger-ui.html default path

spring-bootswagger-2.0swagger-ui

I wanna change my swagger-ui path from localhost:8080/swagger-ui.html to
localhost:8080/myapi/swagger-ui.html in springboot
redirect is helpless to me

Best Answer

In the application.properties of Spring Boot

springdoc.swagger-ui.path=/swagger-ui-custom.html

in your case it will be

springdoc.swagger-ui.path=/myapi/swagger-ui.html
Related Topic