The Spring Mediator exposes a spring bean as a mediator. The Spring Mediator creates an instance of a mediator, which is managed by Spring. This Spring bean must implement the Mediator interface for it to act as a Mediator. Syntax of Spring Mediator <spring:spring bean="exampleBean" key="string"/> First, we need to create a Mediator Project for Bean classes. (for more information visit the How to use WSO2 Class Mediator in WSO2 ESB ) For explaining clearly, I have created to Person and Student Beans. Person Bean. package lk.harshana; import org.apache.synapse.MessageContext; import org.apache.synapse.mediators.AbstractMediator; public class Person extends AbstractMediator { private String name; private String address; private String email; @Override public boolean mediate(MessageContext arg0) { System.out.println("starting person"); System.out.println("name : " + name); System.out.println("address : &