简体   繁体   English

beanInterface在这里引用了什么?

[英]What does beanInterface refer here?

public class SpringHelloWorld extends com.itmill.toolkit.Application {

    public void init() {
        final Window main = new Window("Hello window");
        setMainWindow(main);

        SpringContextHelper helper = new SpringContextHelper(this);
        MyBeanInterface bean = (MyBeanInterface) 
                helper.getBean("myBean");
        main.addComponent(new Label( bean.myMethod() ));
    }
}

http://qastegiano.blogspot.com/2008/01/itmill-toolkit-5-spring.html http://qastegiano.blogspot.com/2008/01/itmill-toolkit-5-spring.html

Is it a custom class or we should define something out there. 它是一个自定义类还是我们应该在那里定义一些东西。

You've got to define something out there. 你必须在那里定义一些东西。 It's an example of how to get a bean out of the bean factory; 这是一个如何从bean工厂中取出bean的例子; substitute a useful class of your own. 替代您自己的有用类。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM