<spring:beans xmlns="http://membrane-soa.org/proxies/1/"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://membrane-soa.org/proxies/1/ http://membrane-soa.org/schemas/proxies-1.xsd">
<router>
<serviceProxy port="5559">
<groovy>
String host = exc.getOriginalHostHeaderHost()
String destination = null
if("abc.com".equals(host))
destination = "https://predic8.com"
if("def.com".equals(host))
destination = "https://google.com"
if(destination == null)
destination = "https://defaultDomain.com"
exc.getDestinations().clear()
exc.getDestinations().add(destination + exc.getOriginalRequestUri())
CONTINUE
</groovy>
</serviceProxy>
</router>
</spring:beans>
<spring:beans xmlns="http://membrane-soa.org/proxies/1/"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://membrane-soa.org/proxies/1/ http://membrane-soa.org/schemas/proxies-1.xsd">
<router>
<serviceProxy port="5559">
<groovy>
String host = exc.getOriginalHostHeaderHost()
String destination = null
def vhosts = [ abc.com:"https://predic8.com",
def.com:"https://google.com"]
destination = vhosts.get(host, "https://defaultDomain.com")
exc.getDestinations().clear()
exc.getDestinations().add(destination + exc.getOriginalRequestUri())
CONTINUE
</groovy>
</serviceProxy>
</router>
</spring:beans>