private static Map<String, String> findServiceBeanDefinitions(ConfigurableListableBeanFactory beanFactory) {
		final Map<String, String> serviceBeanNames = new HashMap<>();
		
		for (String beanName : beanFactory.getBeanDefinitionNames()) {
			AutoJsonRpcServiceImpl autoJsonRpcServiceImplAnnotation = beanFactory.findAnnotationOnBean(beanName, AutoJsonRpcServiceImpl.class);
			JsonRpcService jsonRpcServiceAnnotation = beanFactory.findAnnotationOnBean(beanName, JsonRpcService.class);
			
			if (null != autoJsonRpcServiceImplAnnotation) {
				
				if (null == jsonRpcServiceAnnotation) {
					throw new IllegalStateException("on the bean [" + beanName + "], @" +
							AutoJsonRpcServiceImpl.class.getSimpleName() + " was found, but not @" +
							JsonRpcService.class.getSimpleName() + " -- both are required");
				}
				
				List<String> paths = new ArrayList<>();
				Collections.addAll(paths, autoJsonRpcServiceImplAnnotation.additionalPaths());
				paths.add(jsonRpcServiceAnnotation.value());
				
				for (String path : paths) {
					if (!PATTERN_JSONRPC_PATH.matcher(path).matches()) {
						throw new RuntimeException("the path [" + path + "] for the bean [" + beanName + "] is not valid");
					}
					
					logger.info("exporting bean [{}] ---> [{}]", beanName, path);
					if (isNotDuplicateService(serviceBeanNames, beanName, path)) {
                        serviceBeanNames.put(path, beanName);
                    }
				}
				
			}
		}
		
		collectFromParentBeans(beanFactory, serviceBeanNames);
		return serviceBeanNames;
	}
private static Map < String , String > findServiceBeanDefinitions ( ConfigurableListableBeanFactory beanFactory ) { final Map < String , String > serviceBeanNames = new HashMap < > ( ) ; for ( String beanName : beanFactory . getBeanDefinitionNames ( ) ) { AutoJsonRpcServiceImpl autoJsonRpcServiceImplAnnotation = beanFactory . findAnnotationOnBean ( beanName , AutoJsonRpcServiceImpl . class ) ; JsonRpcService jsonRpcServiceAnnotation = beanFactory . findAnnotationOnBean ( beanName , JsonRpcService . class ) ; if ( null != autoJsonRpcServiceImplAnnotation ) { if ( null == jsonRpcServiceAnnotation ) { throw new IllegalStateException ( "on the bean [" + beanName + "], @" + AutoJsonRpcServiceImpl . class . getSimpleName ( ) + " was found, but not @" + JsonRpcService . class . getSimpleName ( ) + " -- both are required" ) ; } List < String > paths = new ArrayList < > ( ) ; Collections . addAll ( paths , autoJsonRpcServiceImplAnnotation . additionalPaths ( ) ) ; paths . add ( jsonRpcServiceAnnotation . value ( ) ) ; for ( String path : paths ) { if ( ! PATTERN_JSONRPC_PATH . matcher ( path ) . matches ( ) ) { throw new RuntimeException ( "the path [" + path + "] for the bean [" + beanName + "] is not valid" ) ; } logger . info ( "exporting bean [{}] ---> [{}]" , beanName , path ) ; if ( isNotDuplicateService ( serviceBeanNames , beanName , path ) ) { serviceBeanNames . put ( path , beanName ) ; } } } } collectFromParentBeans ( beanFactory , serviceBeanNames ) ; return serviceBeanNames ; }
Finds the beans to expose.
<p>
Searches parent factories as well.