We have plenty of small Spring Boot applications that are potential candidates for a migration to Micronaut. Most of them use Springs HTTP Invoker to communicate with each other.
Here is an example of a client side service bean that will perform a remoting call.
@Bean
public HttpInvokerProxyFactoryBean brokerService() {
HttpInvokerProxyFactoryBean invoker = buildHttpInvokerProxyFactoryBean();
invoker.setServiceUrl(remotingBaseUrl + BrokerService.URI);
invoker.setServiceInterface(BrokerService.class);
return invoker;
}
The BrokerService
looks e.g. like this
public interface BrokerService {
/**
* Creates a new offer of the given data.
*
* @param ctx All relevant data to create a new offer.
* @return the newly created offer instance.
*/
Offer createOffer(OfferCreationContext ctx);
}
Is there a way in Micronaut to use the Spring HTTP Invoker?