Is there a difference between Run As: Spring Boot App and Run As: Java Application?

If I use the Spring Tool Suite or the Spring IDE plugin for eclipse, I can start the Spring 2 boot application in the following ways:

Run As: Spring Boot App Java Application 

enter image description here

Both of these commands work and can run my Spring boot application without any problems. However, I wanted to understand the difference between two different processes. Is there a difference between them or do they work the same?

+6
source share
1 answer

There are several differences, as someone has already hinted at in the comments. This article explains that you get additional “bells and whistles” in the launch configuration editor.

The second and perhaps more important difference is that since Boot 1.3 contains the JMX bean provided by the Spring Boot App, which allows STS to ask the application to close nicely. When you exit the application from the IDE, for example, by pressing the stop / restart button, STS uses this JMX bean to ask the application to close to download. This is a function implemented in the Launch Application launcher, and therefore does not take effect if you use Launch as Java Application.

A Java start simply terminates the start-up process using the Java Process.destroy () method. This is a more “aggressive” way of killing a related process and may not allow the application to clean things up properly, for example, cleanly close database connections.

So ... in the end you get two things:

  • Several additional user interfaces to load in the conf startup editor
  • Perfect completion for Boot 1.3 and later.
+3
source

All Articles