@Test public void testIsBeanDefinitionPresent() { BeanDefinitionRegistry registry = (BeanDefinitionRegistry) beanFactory; Assert.assertTrue(isBeanDefinitionPresent(registry, GLOBAL_NACOS_PROPERTIES_BEAN_NAME, Properties.class)); }
public static boolean isBeanDefinitionPresent(BeanDefinitionRegistry registry, String beanName, Class<?> targetBeanClass) { String[] beanNames = BeanUtils.getBeanNames((ListableBeanFactory) registry, targetBeanClass); return ArrayUtils.contains(beanNames, beanName); }
NacosBeanUtils { public static boolean isBeanDefinitionPresent(BeanDefinitionRegistry registry, String beanName, Class<?> targetBeanClass) { String[] beanNames = BeanUtils.getBeanNames((ListableBeanFactory) registry, targetBeanClass); return ArrayUtils.contains(beanNames, beanName); } }
NacosBeanUtils { public static boolean isBeanDefinitionPresent(BeanDefinitionRegistry registry, String beanName, Class<?> targetBeanClass) { String[] beanNames = BeanUtils.getBeanNames((ListableBeanFactory) registry, targetBeanClass); return ArrayUtils.contains(beanNames, beanName); }  }
NacosBeanUtils { public static boolean isBeanDefinitionPresent(BeanDefinitionRegistry registry, String beanName, Class<?> targetBeanClass) { String[] beanNames = BeanUtils.getBeanNames((ListableBeanFactory) registry, targetBeanClass); return ArrayUtils.contains(beanNames, beanName); }  static void registerSingleton(BeanDefinitionRegistry registry, String beanName,
			Object singletonObject); static void registerInfrastructureBean(BeanDefinitionRegistry registry,
			String beanName, Class<?> beanClass, Object... constructorArgs); static void registerInfrastructureBeanIfAbsent(BeanDefinitionRegistry registry,
			String beanName, Class<?> beanClass, Object... constructorArgs); static BeanFactory resolveBeanFactory(BeanDefinitionRegistry registry); static boolean isBeanDefinitionPresent(BeanDefinitionRegistry registry,
			String beanName, Class<?> targetBeanClass); static void registerPropertySourcesPlaceholderConfigurer(
			BeanDefinitionRegistry registry, BeanFactory beanFactory); static void registerGlobalNacosProperties(AnnotationAttributes attributes,
			BeanDefinitionRegistry registry, PropertyResolver propertyResolver,
			String beanName); static void registerGlobalNacosProperties(Map<?, ?> globalPropertiesAttributes,
			BeanDefinitionRegistry registry, PropertyResolver propertyResolver,
			String beanName); static void registerNacosApplicationContextHolder(
			BeanDefinitionRegistry registry); static void registerNacosConfigPropertiesBindingPostProcessor(
			BeanDefinitionRegistry registry); static void registerNacosConfigListenerMethodProcessor(
			BeanDefinitionRegistry registry); static void registerNacosPropertySourcePostProcessor(
			BeanDefinitionRegistry registry); static void registerAnnotationNacosPropertySourceBuilder(
			BeanDefinitionRegistry registry); static void registerXmlNacosPropertySourceBuilder(
			BeanDefinitionRegistry registry); static void registerNacosConfigListenerExecutor(
			BeanDefinitionRegistry registry, Environment environment); static void registerNacosValueAnnotationBeanPostProcessor(
			BeanDefinitionRegistry registry); static void registerNacosCommonBeans(BeanDefinitionRegistry registry); static void registerNacosConfigBeans(BeanDefinitionRegistry registry,
			Environment environment, BeanFactory beanFactory); static void invokeNacosPropertySourcePostProcessor(BeanFactory beanFactory); static void registerNacosDiscoveryBeans(BeanDefinitionRegistry registry); static Properties getGlobalPropertiesBean(BeanFactory beanFactory); static NacosServiceFactory getNacosServiceFactoryBean(BeanFactory beanFactory); static NacosServiceFactory getNacosServiceFactoryBean(); static ApplicationContextHolder getApplicationContextHolder(
			BeanFactory beanFactory); static ExecutorService getNacosConfigListenerExecutorIfPresent(
			BeanFactory beanFactory); static ConfigServiceBeanBuilder getConfigServiceBeanBuilder(
			BeanFactory beanFactory); static NamingServiceBeanBuilder getNamingServiceBeanBuilder(
			BeanFactory beanFactory); static NamingMaintainServiceBeanBuilder getNamingMaintainServiceBeanBuilder(
			BeanFactory beanFactory); }
NacosBeanUtils { public static boolean isBeanDefinitionPresent(BeanDefinitionRegistry registry, String beanName, Class<?> targetBeanClass) { String[] beanNames = BeanUtils.getBeanNames((ListableBeanFactory) registry, targetBeanClass); return ArrayUtils.contains(beanNames, beanName); }  static void registerSingleton(BeanDefinitionRegistry registry, String beanName,
			Object singletonObject); static void registerInfrastructureBean(BeanDefinitionRegistry registry,
			String beanName, Class<?> beanClass, Object... constructorArgs); static void registerInfrastructureBeanIfAbsent(BeanDefinitionRegistry registry,
			String beanName, Class<?> beanClass, Object... constructorArgs); static BeanFactory resolveBeanFactory(BeanDefinitionRegistry registry); static boolean isBeanDefinitionPresent(BeanDefinitionRegistry registry,
			String beanName, Class<?> targetBeanClass); static void registerPropertySourcesPlaceholderConfigurer(
			BeanDefinitionRegistry registry, BeanFactory beanFactory); static void registerGlobalNacosProperties(AnnotationAttributes attributes,
			BeanDefinitionRegistry registry, PropertyResolver propertyResolver,
			String beanName); static void registerGlobalNacosProperties(Map<?, ?> globalPropertiesAttributes,
			BeanDefinitionRegistry registry, PropertyResolver propertyResolver,
			String beanName); static void registerNacosApplicationContextHolder(
			BeanDefinitionRegistry registry); static void registerNacosConfigPropertiesBindingPostProcessor(
			BeanDefinitionRegistry registry); static void registerNacosConfigListenerMethodProcessor(
			BeanDefinitionRegistry registry); static void registerNacosPropertySourcePostProcessor(
			BeanDefinitionRegistry registry); static void registerAnnotationNacosPropertySourceBuilder(
			BeanDefinitionRegistry registry); static void registerXmlNacosPropertySourceBuilder(
			BeanDefinitionRegistry registry); static void registerNacosConfigListenerExecutor(
			BeanDefinitionRegistry registry, Environment environment); static void registerNacosValueAnnotationBeanPostProcessor(
			BeanDefinitionRegistry registry); static void registerNacosCommonBeans(BeanDefinitionRegistry registry); static void registerNacosConfigBeans(BeanDefinitionRegistry registry,
			Environment environment, BeanFactory beanFactory); static void invokeNacosPropertySourcePostProcessor(BeanFactory beanFactory); static void registerNacosDiscoveryBeans(BeanDefinitionRegistry registry); static Properties getGlobalPropertiesBean(BeanFactory beanFactory); static NacosServiceFactory getNacosServiceFactoryBean(BeanFactory beanFactory); static NacosServiceFactory getNacosServiceFactoryBean(); static ApplicationContextHolder getApplicationContextHolder(
			BeanFactory beanFactory); static ExecutorService getNacosConfigListenerExecutorIfPresent(
			BeanFactory beanFactory); static ConfigServiceBeanBuilder getConfigServiceBeanBuilder(
			BeanFactory beanFactory); static NamingServiceBeanBuilder getNamingServiceBeanBuilder(
			BeanFactory beanFactory); static NamingMaintainServiceBeanBuilder getNamingMaintainServiceBeanBuilder(
			BeanFactory beanFactory); static final String PLACEHOLDER_CONFIGURER_BEAN_NAME; static final String GLOBAL_NACOS_PROPERTIES_BEAN_NAME; static final String CONFIG_GLOBAL_NACOS_PROPERTIES_BEAN_NAME; static final String DISCOVERY_GLOBAL_NACOS_PROPERTIES_BEAN_NAME; static final String MAINTAIN_GLOBAL_NACOS_PROPERTIES_BEAN_NAME; static final String NACOS_CONFIG_LISTENER_EXECUTOR_BEAN_NAME; static final String IGNORE_RESOURCE_NOT_FOUND; static final String IGNORE_UNRESOLVABLE_PLACEHOLDERS; }