1import org.mozilla.javascript.NativeJavaObject;
2import org.springframework.context.*;
3import org.springframework.context.support.*;
4import org.springframework.beans.factory.*;
5import test.TestInterface;
9 public static final void main(String[] args) throws Exception {
10 ApplicationContext context = new ClassPathXmlApplicationContext(new String[] { "beans.xml" });
11 BeanFactory factory = (BeanFactory) context;
13 TestInterface ti1 = (TestInterface) factory.getBean("test1");
14 System.out.println("jython test: " + ti1.getTest());
16 TestInterface ti2 = (TestInterface) factory.getBean("test2");
17 System.out.println("rhino test: " + ti2.getTest());