Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/363.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何在spring中将birt运行时对象创建为singleton_Java_Spring_Birt_Singleton Type - Fatal编程技术网

Java 如何在spring中将birt运行时对象创建为singleton

Java 如何在spring中将birt运行时对象创建为singleton,java,spring,birt,singleton-type,Java,Spring,Birt,Singleton Type,我想创建一个单例birt对象,因为birt对象是一个重量级对象,我不熟悉这项技术,因此需要任何帮助。在应用程序上下文中使用此对象: <bean id="accountController" class="com.foo.DefaultAccountController" /> <!-- (singleton scope is the default) --> <bean id="accountService" class="com.foo.DefaultAccou

我想创建一个单例birt对象,因为birt对象是一个重量级对象,我不熟悉这项技术,因此需要任何帮助。

在应用程序上下文中使用此对象:

<bean id="accountController" class="com.foo.DefaultAccountController" />

<!-- (singleton scope is the default) -->
<bean id="accountService" class="com.foo.DefaultAccountService" />

详细信息可在中找到。

如何将该对象传递给其他类。@user3060230 I更新答案
public class DefaultAccountController {
    @Autowired
    private DefaultAccountService accService;

    ...
}