Skip to content

Commit

Permalink
Add empty constructor for DubboLifecycleComponentApplicationListener (#…
Browse files Browse the repository at this point in the history
…7357)

* add empty constructor for DubboLifecycleComponentApplicationListener

* recover format

* recover format

* add empty constructor for DubboBootstrapApplicationListener
  • Loading branch information
AlbumenJ committed Mar 28, 2021
1 parent 283c079 commit eeac3a0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ public class DubboBootstrapApplicationListener extends OnceApplicationContextEve

private final DubboBootstrap dubboBootstrap;

public DubboBootstrapApplicationListener() {
this.dubboBootstrap = DubboBootstrap.getInstance();
}

public DubboBootstrapApplicationListener(ApplicationContext applicationContext) {
super(applicationContext);
this.dubboBootstrap = DubboBootstrap.getInstance();
Expand All @@ -51,6 +55,9 @@ public DubboBootstrapApplicationListener(ApplicationContext applicationContext)

@Override
public void onApplicationContextEvent(ApplicationContextEvent event) {
if (DubboBootstrapStartStopListenerSpringAdapter.applicationContext == null) {
DubboBootstrapStartStopListenerSpringAdapter.applicationContext = event.getApplicationContext();
}
if (event instanceof ContextRefreshedEvent) {
onContextRefreshedEvent((ContextRefreshedEvent) event);
} else if (event instanceof ContextClosedEvent) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
package org.apache.dubbo.config.spring.context;


import org.apache.dubbo.common.context.Lifecycle;

import com.alibaba.spring.context.OnceApplicationContextEventListener;
Expand Down Expand Up @@ -51,6 +50,9 @@ public class DubboLifecycleComponentApplicationListener extends OnceApplicationC

private List<Lifecycle> lifecycleComponents = emptyList();

public DubboLifecycleComponentApplicationListener() {
}

public DubboLifecycleComponentApplicationListener(ApplicationContext applicationContext) {
super(applicationContext);
}
Expand Down

0 comments on commit eeac3a0

Please sign in to comment.