0
votes

I have spring-boot mvc project - maven.

Specifically I want to debug @Controller class.

I converted it to eclipse project with

mvn eclipse:eclipse -Dwtpversion=2.0

Then in eclipse, I tried to Debug it on Server (Tomcat 7), but got an error

The server does not support version 3.1 of the J2EE Web module specification.

In Facets configurations, it doesn't allow me to choose any other version of 'Dynamic Web Module' from 3.1.

I also tried to debug like that: from project root I ran:

mvndebug spring-boot::run

And then connected debug-remote, but when I opened the page in browser, break point of the controller didn't trigger.

1

1 Answers

1
votes

You should not use eclipse:eclipse cause it's deprecated very long time...If you like to debug the Spring Boot application you can do this via:

mvn spring-boot:run -Drun.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"

You need to start Eclipse via Debug configuration.

The execution mvnDebug... will debug Maven itself which is not what you want to do.