← ResourcesConnector migration

Migrating the MuleSoft HTTP connector to Spring Boot

5 min read

The MuleSoft HTTP connector is in almost every Mule app — as the inbound listener that exposes an API and as the outbound requester that calls other services. Both map directly onto Spring Boot: the listener becomes a @RestController, the requester becomes a WebClient call.

Operation mapping

  • http:listener (source) → a @RestController method with @GetMapping / @PostMapping and the same path
  • http:request → WebClient.get()/post()...retrieve()
  • response status / headers → ResponseEntity with the same status and header mapping

Before and after: inbound listener

Mule (XML)
<http:listener config-ref="HTTP_Listener" path="/orders"/>
Spring Boot (Java)
@RestController
class OrdersController {
    @GetMapping("/orders")
    public ResponseEntity<Object> getOrders() {
        // flow body
    }
}

Before and after: outbound request

Mule (XML)
<http:request method="GET" url="https://api.example.com/orders"/>
Spring Boot (Java)
webClient.get()
    .uri("https://api.example.com/orders")
    .retrieve()
    .bodyToMono(String.class)
    .block();

Mule's HTTP requester has no default response-size limit. When you convert to WebClient, raise the in-memory buffer (maxInMemorySize) so large responses don't fail — a subtle behavioural difference that a naive migration misses.

How the conversion is validated

HTTP is validated end-to-end against a live Mule runtime: the converted Spring Boot app is deployed alongside the original and the same requests are replayed against both, with every response field, status code, and header compared. In our reference conversion the HTTP endpoints match the Mule runtime byte-for-byte.

Prove it on your own code

Send us one Mule application and your Postman collection. We convert it and prove the Spring Boot output matches field-by-field — on-premise, inside your environment.