четверг, 19 сентября 2024 г.

Spring Boot with Gradle in IntelliJ Idea: profiler cannot connect to the application

When I'm trying to profile my Spring Boot application, built with Gradle and run with :bootRun, in IntelliJ Idea, I face the following error:

"Cannot connect to target JVM. Exception creating connection to: 192.168.x.x; ..."

The reason is obviously in the fact, that IntelliJ tries to use my IP from the network card instead of localhost. 

To change that, in my build.gradle I configured the bootRun task in the following way:

bootRun {

    jvmArgs('-Djava.rmi.server.hostname=localhost')

}


Комментариев нет:

Отправить комментарий