barbitoff programmer`s blog

Здесь я публикую заметки из программерской жизни: грабли, на которые мне случилось наступить, проблемы, для которых было найдено элегантное (или не очень) решение, а также все, с чем мне пришлось столкнуться и чем хотелось бы поделиться =)
PS Если хотите меня поблагодарить - на странице есть 3 места, чтобы это сделать =)

четверг, 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')

}


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

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