changelog shortlog tags changeset files revisions annotate raw

src/Test.java

changeset 8: 846b10b4db8a
parent:af0edff8750f
author: jason@briggs.net.nz
date: Thu Nov 01 21:59:09 2007 +1300 (2 years ago)
permissions: -rw-r--r--
description: add readme.txt
1import org.mozilla.javascript.NativeJavaObject;
2import org.springframework.context.*;
3import org.springframework.context.support.*;
4import org.springframework.beans.factory.*;
5import test.TestInterface;
6
7
8public class Test {
9 public static final void main(String[] args) throws Exception {
10 ApplicationContext context = new ClassPathXmlApplicationContext(new String[] { "beans.xml" });
11 BeanFactory factory = (BeanFactory) context;
12
13 TestInterface ti1 = (TestInterface) factory.getBean("test1");
14 System.out.println("jython test: " + ti1.getTest());
15
16 TestInterface ti2 = (TestInterface) factory.getBean("test2");
17 System.out.println("rhino test: " + ti2.getTest());
18 }
19}