public void afterPropertiesSet() throws Exception {

		if (objectMapper == null && applicationContext != null && applicationContext.containsBean("objectMapper")) {
			objectMapper = (ObjectMapper) applicationContext.getBean("objectMapper");
		}
		if (objectMapper == null && applicationContext != null) {
			try {
				objectMapper = BeanFactoryUtils.beanOfTypeIncludingAncestors(applicationContext, ObjectMapper.class);
			} catch (Exception e) {
				logger.debug(e);
			}
		}
		if (objectMapper == null) {
			objectMapper = new ObjectMapper();
		}

		// Create the server. The 'handler' parameter here is either a proxy or the real instance depending on
		// the presence or absence of the interface. This is because it is not possible to create a proxy unless
		// an interface is specified.

		jsonRpcServer = new JsonRpcServer(
				objectMapper,
				null == getServiceInterface() ? getService() : getProxyForService(),
				getServiceInterface());
		jsonRpcServer.setErrorResolver(errorResolver);
		jsonRpcServer.setBackwardsCompatible(backwardsCompatible);
		jsonRpcServer.setRethrowExceptions(rethrowExceptions);
		jsonRpcServer.setAllowExtraParams(allowExtraParams);
		jsonRpcServer.setAllowLessParams(allowLessParams);
		jsonRpcServer.setInvocationListener(invocationListener);
		jsonRpcServer.setHttpStatusCodeProvider(httpStatusCodeProvider);
		jsonRpcServer.setConvertedParameterTransformer(convertedParameterTransformer);
		jsonRpcServer.setShouldLogInvocationErrors(shouldLogInvocationErrors);

		if (contentType != null) {
			jsonRpcServer.setContentType(contentType);
		}
		if (interceptorList != null) {
			jsonRpcServer.setInterceptorList(interceptorList);
		}

		ReflectionUtil.clearCache();

		exportService();
	}
public void afterPropertiesSet ( ) throws Exception { if ( objectMapper == null && applicationContext != null && applicationContext . containsBean ( "objectMapper" ) ) { objectMapper = ( ObjectMapper ) applicationContext . getBean ( "objectMapper" ) ; } if ( objectMapper == null && applicationContext != null ) { try { objectMapper = BeanFactoryUtils . beanOfTypeIncludingAncestors ( applicationContext , ObjectMapper . class ) ; } catch ( Exception e ) { logger . debug ( e ) ; } } if ( objectMapper == null ) { objectMapper = new ObjectMapper ( ) ; } jsonRpcServer = new JsonRpcServer ( objectMapper , null == getServiceInterface ( ) ? getService ( ) : getProxyForService ( ) , getServiceInterface ( ) ) ; jsonRpcServer . setErrorResolver ( errorResolver ) ; jsonRpcServer . setBackwardsCompatible ( backwardsCompatible ) ; jsonRpcServer . setRethrowExceptions ( rethrowExceptions ) ; jsonRpcServer . setAllowExtraParams ( allowExtraParams ) ; jsonRpcServer . setAllowLessParams ( allowLessParams ) ; jsonRpcServer . setInvocationListener ( invocationListener ) ; jsonRpcServer . setHttpStatusCodeProvider ( httpStatusCodeProvider ) ; jsonRpcServer . setConvertedParameterTransformer ( convertedParameterTransformer ) ; jsonRpcServer . setShouldLogInvocationErrors ( shouldLogInvocationErrors ) ; if ( contentType != null ) { jsonRpcServer . setContentType ( contentType ) ; } if ( interceptorList != null ) { jsonRpcServer . setInterceptorList ( interceptorList ) ; } ReflectionUtil . clearCache ( ) ; exportService ( ) ; }
{@inheritDoc}