0

I am following https://www.baeldung.com/spring-rest-openapi-documentation

I am using IntelliJ community edition 2022.3.2 as my IDE.

How to launch the mentioned file http://localhost:8080/swagger-ui.html automatically on startup?

Is there any configuration option, or am I supposed to write some custom code to launch it on startup of the Spring Boot application? For now I have done the latter, but I am concerned that this is not the right approach. In some of my past projects, I have seen this page open up automatically.

Helen
  • 87,344
  • 17
  • 243
  • 314
  • That URL is meant to be called against a Spring Boot app . You would put that URL in your browser to call an endpoint on the HTTP API that your app presents. Do you have a Spring Boot app already? If not, there's really no reason to be looking to use Swagger. The purpose of that tool is to produce documentation for an API that you already have. if you don't have a Spring Boot app already serving an API, then you don't have any reason to use Swagger. – CryptoFool Feb 14 '23 at 06:21
  • You could use the way here to launch a page when starting the Spring Boot app in IDEA: https://stackoverflow.com/a/57234198 though it doesn't wait for the server to be started. – LJ replica Feb 14 '23 at 06:35

0 Answers0