Home  >  Article  >  Java  >  How to solve the problem of invalid debugging when setting breakpoints in SpringBoot project

How to solve the problem of invalid debugging when setting breakpoints in SpringBoot project

王林
王林forward
2023-05-11 10:49:112196browse

I just came into contact with the springboot project.

(1) I found that breakpoint debugging was invalid. I was very depressed and searched for solutions online.

What I saw were some very complicated solutions, which were said to be remote debugging, but also required additional opening slogans. This is different from a traditional project, so I don’t think it’s necessary.

So after some exploration, I found a simpler way. The steps are as follows:

How to solve the problem of invalid debugging when setting breakpoints in SpringBoot project

Add a configuration to the plugin part of the pom file:

<configuration>
    <fork>false</fork>
</configuration>

This is ok;

(2) Regarding the error reported in the SpringBoot project that the web.xml file is missing, because traditional web projects require web.xml files, but the SpringBoot project There is no need for a web.xml file, but the mechanism of the web project is to retrieve whether there is a web.xml file in the project, so at this time, the SpringBoot project will report an error saying that there is no problem with the web.xml file, so Well, the solution is:

How to solve the problem of invalid debugging when setting breakpoints in SpringBoot project

Add a configuration to the plugin part of the pom file:

<failonmissingwebxml>false</failonmissingwebxml>

The above is the detailed content of How to solve the problem of invalid debugging when setting breakpoints in SpringBoot project. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete