我想在intellij Idea中以调试模式启动spring-boot maven应用程序,但是当我创建断点时,该应用程序不会挂起并且会继续运行。我已经阅读了很多主题,但是我仍然不知道该怎么做。您能帮我决定最好的做法吗?
编辑:我在命令行中使用spring-boot-maven-plugin和spring-boot:run的Maven Run / Debug配置。
编辑:因此,当我向pom.xml添加Jvm参数时,我收到了这样的日志:
[INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building shop 0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] >>> spring-boot-maven-plugin:1.5.8.RELEASE:run (default-cli) > test-compile @ shop >>> [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ shop --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ shop --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ shop --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory C:\Users\Валера\IdeaProjects\shop\src\test\resources [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ shop --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] <<< spring-boot-maven-plugin:1.5.8.RELEASE:run (default-cli) < test-compile @ shop <<< [INFO] [INFO] --- spring-boot-maven-plugin:1.5.8.RELEASE:run (default-cli) @ shop --- [INFO] Attaching agents: [] Listening for transport dt_socket at address: 5005
但是当请求localhost:5005 / myPage时,我收到错误101(net::ERR_CONNECTION_RESET)。似乎未指定某些Maven参数。
在pom.xml中是我的maven plagin:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<jvmArguments>
-Xdebug - Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
</jvmArguments>
</configuration>
</plugin>
</plugins>
</build>
我想在intellij Idea中以调试模式启动spring-boot maven应用程序,但是当我创建断点时,该应用程序不会挂起并且会继续运行。我已经阅读了很多主题,但我仍然没有...
在运行/调试配置中,在命令行中输入以下内容: