Springboot project start swagger prompt error err_ CONNECTION_ Refused solution

Project scenario:

(this is a common problem for novices!) Springboot project starts debugging in idea. When swagger is used to test the API on browser, the server stops after starting the project, and prompts localhost on browser to reject our connection request. At the same time, it prompts err_ CONNECTION_ REFUSED

Problem Description:

prompt: the problems encountered in project debugging are caused by the wrong startup and operation of your own choice:

1. Running results after starting the project in idea:

Automatically shut down the thread and shut down JPA. The key is that after I run it directly, I automatically shut down all the threads, and no error was reported. The browser was not opened. I did some debugging in the early stage, and I don’t know how to do it. I used eclipse and idea to do a lot of things before school,!!! Here is my power debugging option.

2. Browser display results
this is the end of my search for [thread – 5]. I can’t successfully start to access the browser’s address http://localhost : 8181/swagger-ui.html, the browser error is as follows:

Cause analysis:

I read this blog: https://blog.csdn.net/zj15527620802/article/details/84889346
The problem is very simple, that is, the selection of debugging options is wrong. I’m too careless to run


To run the project, just choose the one at the end of application

after successful execution

Read More: