Exit Process finished with exit code 1 directly after the SpringBoot project starts

When starting a SpringBoot project, some errors often occur.

This kind of error has no clear pointing information, but it is certain that springboot failed to start.

How to find out the specific reason for the failure.

The startup of SpringBoot simply includes two parts

1. Instantiation of SpringApplication. Namely: SpringApplication application = new SpringApplication(QurtzJdbcApplication.class)

2. Execute the run() method. application. run(args)

So the problem should appear in these two steps.

In the source code of SpringApplication, we can see the execution of these two steps. At the same time, we found a method called handleRunFailure(). As the name suggests, it is a way to handle runtime errors.

Then as long as you put a breakpoint on this method, you can detect the specific error message.

The SpringBoot version I am using is 2.1.0.RELEASE

Guess you like

Origin blog.csdn.net/kanyun123/article/details/111476682