1

我收到以下异常 8 次:

WARN  DefaultListableBeanFactor - Bean creation exception on FactoryBean type check: org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'rmiRegistryFactoryBean': Requested bean is currently in creation: Is there an unresolvable circular reference?

当我在我的上下文中创建以下 bean 时:

    @Bean
    public RmiRegistryFactoryBean rmiRegistryFactoryBean() {
        RmiRegistryFactoryBean rmiRegistryFactoryBean = new RmiRegistryFactoryBean();
        rmiRegistryFactoryBean.setPort(rmiConfig.getPort());
        rmiRegistryFactoryBean.setAlwaysCreate(true);

        return rmiRegistryFactoryBean;
    }

没有明确的循环引用。

4

0 回答 0