<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-erlang</artifactId>
<version>1.0.0</version>
</dependency>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:erlang="http://www.springframework.org/schema/erlang"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/erlang http://www.springframework.org/schema/erlang/spring-erlang.xsd">
<erlang:node name="myNode" cookie="myCookie" />
<erlang:connection node="myNode" host="localhost" port="9999" />
<erlang:proxy id="myProxy" connection-ref="myNode" module="myModule" />
</beans>
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.erlang.proxy.ErlangProxy;
@Component
public class MyErlangService {
@Autowired
private ErlangProxy myProxy;
public void callErlangCode() {
myProxy.call("myFunction", "arg1", "arg2");
}
}