Skip to content

Commit

Permalink
Revert "remove repeat action of register DubboBootStrapApplicationLis…
Browse files Browse the repository at this point in the history
…tener in ServiceClassPostProcessor, it already register in DubboApplicationListenerRegistrar (#7000)" (#7308)

This reverts commit f75c22c.
  • Loading branch information
chickenlj authored Mar 3, 2021
1 parent d40a1fd commit fcc6298
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.apache.dubbo.config.annotation.Method;
import org.apache.dubbo.config.annotation.Service;
import org.apache.dubbo.config.spring.ServiceBean;
import org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener;
import org.apache.dubbo.config.spring.context.annotation.DubboClassPathBeanDefinitionScanner;
import org.apache.dubbo.config.spring.schema.AnnotationBeanDefinitionParser;

Expand Down Expand Up @@ -67,6 +68,7 @@
import java.util.Objects;
import java.util.Set;

import static com.alibaba.spring.util.BeanRegistrar.registerInfrastructureBean;
import static com.alibaba.spring.util.ObjectUtils.of;
import static java.util.Arrays.asList;
import static org.apache.dubbo.config.spring.beans.factory.annotation.ServiceBeanNameBuilder.create;
Expand Down Expand Up @@ -123,6 +125,9 @@ public ServiceClassPostProcessor(Set<String> packagesToScan) {
@Override
public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {

// @since 2.7.5
registerInfrastructureBean(registry, DubboBootstrapApplicationListener.BEAN_NAME, DubboBootstrapApplicationListener.class);

Set<String> resolvedPackagesToScan = resolvePackagesToScan(packagesToScan);

if (!CollectionUtils.isEmpty(resolvedPackagesToScan)) {
Expand Down

0 comments on commit fcc6298

Please sign in to comment.