maven source not found

 

Using maven development, it is very strange: when debugging the source code in spring, it prompts debug not found.

 

At this point, try to use eclipse's remote debugging.

 

1. Place the following code in the bat file and place it in the root directory of the project.

 

set MAVEN_BATCH_PAUSE=on
set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Dfile.encoding=UTF-8 -Xrunjdwp:transport=dt_socket,address=8787,suspend=n,server=y -Xms256m -Xmx512m -XX:MaxPermSize=128m
mvn clean jetty:run -Dspring.profiles.active=dev

 

2. Run the bat file in 1.

 

3. The remote debugging port is 8787. At this time, in eclipse, debug as ---> configure ---> create a new Remote Java Application, fill in 8787 for the port, and click run.

 

4. At this point, you will find that the source code in spring has been entered.

 

refurl:http://czj4451.iteye.com/blog/1942437

 

Note: In addition to using the debug.bat script, you can also create a new External Tools directly in eclipse

 

Note: -Dspring.profiles.active=dev The purpose of this sentence is to activate the dev profile. Corresponding to the test configuration file.

 

refurl:http://czj4451.iteye.com/blog/1942437

 

 

 

 

 

 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327005486&siteId=291194637