Polish
This commit is contained in:
parent
26b89bfc80
commit
14af1bb2dc
|
|
@ -74,8 +74,7 @@ public class StopMojo extends AbstractMojo {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
getLog().info("Stopping application...");
|
getLog().info("Stopping application...");
|
||||||
try (JMXConnector connector = SpringApplicationAdminClient
|
try (JMXConnector connector = SpringApplicationAdminClient.connect(this.jmxPort)) {
|
||||||
.connect(this.jmxPort)) {
|
|
||||||
MBeanServerConnection connection = connector.getMBeanServerConnection();
|
MBeanServerConnection connection = connector.getMBeanServerConnection();
|
||||||
stop(connection);
|
stop(connection);
|
||||||
}
|
}
|
||||||
|
|
@ -91,8 +90,7 @@ public class StopMojo extends AbstractMojo {
|
||||||
}
|
}
|
||||||
catch (InstanceNotFoundException ex) {
|
catch (InstanceNotFoundException ex) {
|
||||||
throw new MojoExecutionException(
|
throw new MojoExecutionException(
|
||||||
"Spring application lifecycle JMX bean not found. Could not stop application gracefully",
|
"Spring application lifecycle JMX bean not found. Could not stop application gracefully", ex);
|
||||||
ex);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue