IntelliJ does not terminate Spring Boot applications

Answered
 

I am using IntelliJ IDEA 2017.2.5 Ultimate on macOs 10.12.6. I have build very simple Java 1.8 command line application using Spring Boot + Spring Data Jpa + Maven. IntelliJ has created Debug configuration automatically for me after first Java running attempt.

General solution overview:

@SpringBootApplication
public class FirstApplication implements CommandLineRunner {
public static void main(String[] args) {
SpringApplication.run(FirstApplication.class, args);
}

@Override
public void run(String... args) throws Exception
{
log.info("1");
log.info("2");
log.info("3");
}
}

I set breakpoint at line 'log.info("2");' and run in debug mode. Everything works ok, programs stops at dedicated line, but when I click 'Stop' button in IntelliJ, the program continues code execution until reach end of application.

 I expected that program execution will be terminated and no more code execution will be done.

 
0
3 comments

Please file a bug at https://youtrack.jetbrains.com/issues/IDEA with the sample project to reproduce attached.

0
Avatar
Permanently deleted user

Hi,

There are about 5k of bugs still opened/uncompleted in your track, even from 2006. What is the point of creating a new issue.? I just hoped it is a matter of IntelliJ/project configuration.

0

It doesn't mean that all these bugs are still actual and affect many users. Without additional information it would be impossible to help you and YouTrack suites better for that.

0

Please sign in to leave a comment.