jeudi 5 mars 2015

How do I implement Remoting with Spring Annotations?

I have a basic Spring framework web application set up and I am beginning to switch from an XML-based configuration to using annotations. My server and webclient are on different machine, so I have been using the Spring HttpInvokerServiceExporter to enable remoting between them.


Client:



<bean id="accountService" class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">
<property name="serviceUrl" value="${server.url}/AccountService"/>
<property name="serviceInterface" value="com.equinitixanite.knowledgebase.common.service.AccountService"/>
</bean>


Server:



<bean name="accountService" class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
<property name="service" ref="accountService"/>
<property name="serviceInterface" value="example.AccountService"/>


My question is, how do I do the same result with annotations? (By which I mean, how can I avoid having to declare every single service in the XML?)


Aucun commentaire:

Enregistrer un commentaire