private void registerServiceProxy ( DefaultListableBeanFactory defaultListableBeanFactory , String servicePath , String serviceBeanName ) { BeanDefinitionBuilder builder = BeanDefinitionBuilder . rootBeanDefinition ( JsonServiceExporter . class ) . addPropertyReference ( "service" , serviceBeanName ) ; BeanDefinition serviceBeanDefinition = findBeanDefinition ( defaultListableBeanFactory , serviceBeanName ) ; for ( Class < ? > currentInterface : getBeanInterfaces ( serviceBeanDefinition , defaultListableBeanFactory . getBeanClassLoader ( ) ) ) { if ( currentInterface . isAnnotationPresent ( JsonRpcService . class ) ) { String serviceInterface = currentInterface . getName ( ) ; logger . debug ( "Registering interface '{}' for JSON-RPC bean [{}]." , serviceInterface , serviceBeanName ) ; builder . addPropertyValue ( "serviceInterface" , serviceInterface ) ; break ; } } if ( objectMapper != null ) { builder . addPropertyValue ( "objectMapper" , objectMapper ) ; } if ( errorResolver != null ) { builder . addPropertyValue ( "errorResolver" , errorResolver ) ; } if ( invocationListener != null ) { builder . addPropertyValue ( "invocationListener" , invocationListener ) ; } if ( registerTraceInterceptor != null ) { builder . addPropertyValue ( "registerTraceInterceptor" , registerTraceInterceptor ) ; } if ( httpStatusCodeProvider != null ) { builder . addPropertyValue ( "httpStatusCodeProvider" , httpStatusCodeProvider ) ; } if ( convertedParameterTransformer != null ) { builder . addPropertyValue ( "convertedParameterTransformer" , convertedParameterTransformer ) ; } builder . addPropertyValue ( "backwardsCompatible" , backwardsCompatible ) ; builder . addPropertyValue ( "rethrowExceptions" , rethrowExceptions ) ; builder . addPropertyValue ( "allowExtraParams" , allowExtraParams ) ; builder . addPropertyValue ( "allowLessParams" , allowLessParams ) ; defaultListableBeanFactory . registerBeanDefinition ( servicePath , builder . getBeanDefinition ( ) ) ; }
Registers the new beans with the bean factory .