java.util.concurrent.Executors#newSingleThreadExecutor()中的ThreadFactory生成的Thread不是守护线程，并且没有相应逻辑在Spring初始化异常出现时调起ExecutorService的shutdown方法，导致spring初始化失败进程依旧存在，无法通过进程是否存在判断程序启动是否正常。建议更换ThreadFactory。可通过错误的application.yml配置复现问题。
* limitations under the License.
 */
package org.apache.dubbo.spring.boot.context.event;
import org.apache.dubbo.config.ApplicationConfig;
import org.apache.dubbo.config.spring.context.annotation.EnableDubboConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.BeanFactoryUtils;
import org.springframework.beans.factory.ListableBeanFactory;
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.core.Ordered;
import org.springframework.core.env.Environment;
import java.util.Objects;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors;
import static org.springframework.context.ConfigurableApplicationContext.ENVIRONMENT_BEAN_NAME;
/**
 * The {@link ApplicationListener} class for Dubbo Config {@link BeanDefinition Bean Definition} to resolve conflict
 * @see BeanDefinition
 * @see ApplicationListener
 * @since 2.7.5
 */
public class DubboConfigBeanDefinitionConflictApplicationListener implements ApplicationListener<ContextRefreshedEvent>,