Update SpringEventOrderListener.java

pull/441/head
cheese8 3 years ago
parent 75c8875b2a
commit 85876ee13e

@ -10,7 +10,7 @@ public class SpringEventOrderListener implements ApplicationListener {
@Override
public void onApplicationEvent(ApplicationEvent event) {
switch (event.getClass().getSimpleName()){
switch (event.getClass().getSimpleName()) {
case "ApplicationStartingEvent":
System.out.println("事件ApplicationStartingEvent");
break;
@ -30,13 +30,13 @@ public class SpringEventOrderListener implements ApplicationListener {
System.out.println("事件ApplicationStartedEvent");
break;
case "ServletWebServerInitializedEvent":
if( event instanceof WebServerInitializedEvent){
if (event instanceof WebServerInitializedEvent) {
System.out.println("事件WebServerInitializedEvent");
}
if( event instanceof ServletWebServerInitializedEvent){
if (event instanceof ServletWebServerInitializedEvent) {
System.out.println("事件ServletWebServerInitializedEvent");
}
if( event instanceof ReactiveWebServerInitializedEvent){
if (event instanceof ReactiveWebServerInitializedEvent) {
System.out.println("事件ReactiveWebServerInitializedEvent");
}
break;

Loading…
Cancel
Save