java - 这里的beanInterface指的是什么?

标签 java spring

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

它是一个自定义类还是我们应该在那里定义一些东西。

最佳答案

你必须定义一些东西。这是一个如何从 bean 工厂取出 bean 的例子;替换您自己的有用的类。

关于java - 这里的beanInterface指的是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4572613/

相关文章:

java - 使用java对mongodb中的子文档数组进行排序

hibernate - 在 Spring/Hibernate 堆栈中打开 session 的位置?

java - JarFileFactory 缓存 jar 文件

java - SEVERE : Running with Java class version 53. 0,但 52.0 是必需的错误,Jenkins 通过命令提示符显示为 "java -jar jenkins.war"

java - 如何根据 JavaFx 中标签中的文本调整 VBox 和 Label 的大小?

java - 不同值的变量如何引用?

带有 Kafka 和 Websockets 的 Spring WebFlux

java - Springboot TomcatEmbeddedServletContainer KeepAliveTimeout 不工作

spring - 无法找到 XML 模式命名空间的 Spring NamespaceHandler [http ://cxf. apache.org/jaxws]

java - 为什么在Spring中使用服务实现模式